You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-19
Original file line number
Diff line number
Diff line change
@@ -98,8 +98,8 @@ enum Example<T> {
98
98
### Skipping fields
99
99
100
100
With a `skip` or `skip_inner` attribute fields can be skipped for traits
101
-
that allow it, which are: [`Debug`], [`Hash`], [`Ord`](https://doc.rust-lang.org/core/cmp/trait.Ord.html), [`PartialOrd`](https://doc.rust-lang.org/core/cmp/trait.PartialOrd.html),
102
-
[`PartialEq`](https://doc.rust-lang.org/core/cmp/trait.PartialEq.html) and [`Zeroize`].
101
+
that allow it, which are: [`Debug`], [`Hash`], [`Ord`], [`PartialOrd`],
102
+
[`PartialEq`] and [`Zeroize`].
103
103
104
104
```rust
105
105
#[derive(DeriveWhere)]
@@ -151,7 +151,7 @@ assert_ne!(
151
151
[`Zeroize`] has three options:
152
152
-`crate`: an item-level option which specifies a path to the `zeroize`
153
153
crate in case of a re-export or rename.
154
-
-`drop`: an item-level option which implements [`Drop`](https://doc.rust-lang.org/core/ops/trait.Drop.html) and uses
154
+
-`drop`: an item-level option which implements [`Drop`] and uses
155
155
[`Zeroize`] to erase all data from memory.
156
156
-`fqs`: a field -level option which will use fully-qualified-syntax instead
157
157
of calling the [`zeroize`][`method@zeroize`] method on `self` directly.
@@ -184,15 +184,15 @@ assert_eq!(test.0, 0);
184
184
### Supported traits
185
185
186
186
The following traits can be derived with derive-where:
-[`Zeroize`]: Only available with the `zeroize` crate feature.
197
197
198
198
### Supported items
@@ -202,24 +202,23 @@ it's best to discourage usage that could be covered by std's `derive`. For
202
202
example unit structs and enums only containing unit variants aren't
203
203
supported.
204
204
205
-
Unions only support [`Clone`](https://doc.rust-lang.org/core/clone/trait.Clone.html) and [`Copy`](https://doc.rust-lang.org/core/marker/trait.Copy.html).
205
+
Unions only support [`Clone`] and [`Copy`].
206
206
207
207
### `no_std` support
208
208
209
209
`no_std` support is provided by default.
210
210
211
211
## Crate features
212
212
213
-
-`nightly`: Implements [`Ord`](https://doc.rust-lang.org/core/cmp/trait.Ord.html) and [`PartialOrd`](https://doc.rust-lang.org/core/cmp/trait.PartialOrd.html) with the help of
214
-
[`core::intrinsics::discriminant_value`](https://doc.rust-lang.org/core/intrinsics/fn.discriminant_value.html), which is what Rust does by
215
-
default too. Without this feature [`transmute`](https://doc.rust-lang.org/core/mem/fn.transmute.html) is
216
-
used to convert [`Discriminant`](https://doc.rust-lang.org/core/mem/struct.Discriminant.html) to a [`i32`](https://doc.rust-lang.org/core/primitive.i32.html),
217
-
which is the underlying type.
218
-
-`safe`: Implements [`Ord`](https://doc.rust-lang.org/core/cmp/trait.Ord.html) and [`PartialOrd`](https://doc.rust-lang.org/core/cmp/trait.PartialOrd.html) manually. This is much
213
+
-`nightly`: Implements [`Ord`] and [`PartialOrd`] with the help of
214
+
[`core::intrinsics::discriminant_value`], which is what Rust does by
215
+
default too. Without this feature [`transmute`] is used to convert
216
+
[`Discriminant`] to a [`i32`], which is the underlying type.
217
+
-`safe`: Implements [`Ord`] and [`PartialOrd`] manually. This is much
219
218
slower, but might be preferred if you don't trust derive-where. It also
220
-
replaces all cases of [`core::hint::unreachable_unchecked`](https://doc.rust-lang.org/core/hint/fn.unreachable_unchecked.html) in [`Ord`](https://doc.rust-lang.org/core/hint/fn.unreachable_unchecked.html),
221
-
[`PartialEq`](https://doc.rust-lang.org/core/cmp/trait.PartialEq.html) and [`PartialOrd`](https://doc.rust-lang.org/core/cmp/trait.PartialOrd.html), which is what std uses, with
0 commit comments