File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -153,23 +153,25 @@ use derive_more::Display;
153
153
154
154
To avoid redundant compilation times, by default no derives are supported.
155
155
You have to enable each type of derive as a feature in ` Cargo.toml ` :
156
-
157
156
``` toml
158
157
[dependencies ]
159
- derive_more = " =1.0.0-beta.6"
160
158
# You can specify the types of derives that you need for less time spent
161
159
# compiling. For the full list of features see this crate its `Cargo.toml`.
162
- features = [" from" , " add" , " iterator" ]
163
-
160
+ derive_more = { version = " =1.0.0-beta.6" , features = [" from" , " add" , " iterator" ] }
161
+ ```
162
+ ``` toml
163
+ [dependencies ]
164
164
# If you don't care much about compilation times and simply want to have
165
165
# support for all the possible derives, you can use the "full" feature.
166
- features = [" full" ]
167
-
166
+ derive_more = { version = " =1.0.0-beta.6" , features = [" full" ] }
167
+ ```
168
+ ``` toml
169
+ [dependencies ]
168
170
# If you run in a `no_std` environment you should disable the default features,
169
171
# because the only default feature is the "std" feature.
170
172
# NOTE: You can combine this with "full" feature to get support for all the
171
173
# possible derives in a `no_std` environment.
172
- default-features = false
174
+ derive_more = { version = " =1.0.0-beta.6 " , default-features = false }
173
175
```
174
176
175
177
And this to the top of your Rust file:
You can’t perform that action at this time.
0 commit comments