File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,5 @@ path = "lib.rs"
1414
1515[dependencies ]
1616serde = { version = " 1.0" , features = [" derive" ] }
17- toml = { version = " 0.5 " , default-features = false }
17+ toml = { version = " 0.7 " , default-features = false }
1818thiserror = " 1"
Original file line number Diff line number Diff line change @@ -278,8 +278,9 @@ impl Metadata {
278278 // Pass `RUSTFLAGS` and `RUSTDOCFLAGS` using `cargo --config`, which handles whitespace correctly.
279279 if !self . rustc_args . is_empty ( ) {
280280 cargo_args. push ( "--config" . into ( ) ) ;
281- let rustflags =
282- toml:: to_string ( & self . rustc_args ) . expect ( "serializing a string should never fail" ) ;
281+ let rustflags = toml:: Value :: try_from ( & self . rustc_args )
282+ . expect ( "serializing a string should never fail" )
283+ . to_string ( ) ;
283284 cargo_args. push ( format ! ( "build.rustflags={rustflags}" ) ) ;
284285 cargo_args. push ( "-Zhost-config" . into ( ) ) ;
285286 cargo_args. push ( "-Ztarget-applies-to-host" . into ( ) ) ;
@@ -289,8 +290,9 @@ impl Metadata {
289290
290291 if !all_rustdoc_args. is_empty ( ) {
291292 cargo_args. push ( "--config" . into ( ) ) ;
292- let rustdocflags =
293- toml:: to_string ( & all_rustdoc_args) . expect ( "serializing a string should never fail" ) ;
293+ let rustdocflags = toml:: Value :: try_from ( & all_rustdoc_args)
294+ . expect ( "serializing a string should never fail" )
295+ . to_string ( ) ;
294296 cargo_args. push ( format ! ( "build.rustdocflags={rustdocflags}" ) ) ;
295297 }
296298
You can’t perform that action at this time.
0 commit comments