File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ This crate is guaranteed to compile when using the latest stable Rust version at
52
52
53
53
Licensed under either of:
54
54
55
- - Apache License, Version 2.0 ([ LICENSE-APACHE] ( ../LICENSE-APACHE ) or http://www.apache.org/licenses/LICENSE-2.0 )
56
- - MIT license ([ LICENSE-MIT] ( ../LICENSE-MIT ) or http://opensource.org/licenses/MIT )
55
+ - Apache License, Version 2.0 ([ LICENSE-APACHE] ( ../LICENSE-APACHE ) or < http://www.apache.org/licenses/LICENSE-2.0 > )
56
+ - MIT license ([ LICENSE-MIT] ( ../LICENSE-MIT ) or < http://opensource.org/licenses/MIT > )
57
57
58
58
at your option.
59
59
Original file line number Diff line number Diff line change @@ -149,13 +149,14 @@ pub fn build_documentation(
149
149
let args = builder. build ( ) ;
150
150
log:: debug!( "{args:#?}" ) ;
151
151
152
+ let mut envs = vec ! [ ( "RUSTDOCFLAGS" , "--cfg docsrs --cfg not_really_docsrs" ) ] ;
153
+ // Special case: `esp-storage` requires the optimization level to be 2 or 3:
154
+ if package == Package :: EspStorage {
155
+ envs. push ( ( "CARGO_PROFILE_DEBUG_OPT_LEVEL" , "3" ) ) ;
156
+ }
157
+
152
158
// Execute `cargo doc` from the package root:
153
- cargo:: run_with_env (
154
- & args,
155
- & package_path,
156
- [ ( "RUSTDOCFLAGS" , "--cfg docsrs --cfg not_really_docsrs" ) ] ,
157
- false ,
158
- ) ?;
159
+ cargo:: run_with_env ( & args, & package_path, envs, false ) ?;
159
160
160
161
// Build up the path at which the built documentation can be found:
161
162
let mut docs_path = workspace. join ( package. to_string ( ) ) . join ( "target" ) ;
You can’t perform that action at this time.
0 commit comments