boozook / mdbook-svgbob

SvgBob mdbook preprocessor which swaps code-blocks with neat SVG.
Mozilla Public License 2.0
76 stars 8 forks source link

Cannot compile mdbook-svgbob v0.2.1(2023.07.19) #27

Closed ANDADAC closed 11 months ago

ANDADAC commented 11 months ago

andadac@HP-BSPARK:~/repos/comprehensive-rust$ cargo install mdbook-svgbob Updating crates.io index Installing mdbook-svgbob v0.2.1 Updating crates.io index Compiling proc-macro2 v1.0.66 Compiling unicode-ident v1.0.11 Compiling autocfg v1.1.0 Compiling libc v0.2.147

...

Compiling pulldown-cmark-to-cmark v10.0.4 Compiling toml v0.5.11 Compiling svg v0.12.1 Compiling mdbook-svgbob v0.2.1 error[E0277]: the trait bound Cfg: From<&toml::map::Map<std::string::String, toml::value::Value>> is not satisfied --> /home/andadac/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mdbook-svgbob-0.2.1/src/preprocessor.rs:58:42 58 ... .and_then( map map.try_into().map_err( err error!("{}", err)).ok()) ^^^^^^^^ the trait From<&toml::map::Map<std::string::String, toml::value::Value>> is not implemented for Cfg

= note: required for &toml::map::Map<std::string::String, toml::value::Value> to implement Into<Cfg> = note: required for Cfg to implement TryFrom<&toml::map::Map<std::string::String, toml::value::Value>> = note: required for &toml::map::Map<std::string::String, toml::value::Value> to implement TryInto<Cfg>

For more information about this error, try rustc --explain E0277. error: could not compile mdbook-svgbob (bin "mdbook-svgbob") due to previous error error: failed to compile mdbook-svgbob v0.2.1, intermediate artifacts can be found at /tmp/cargo-installWvoAmecd


in WSL2, after sudo-apt update, upgrade, rustup update, install mdbook done

ANDADAC commented 11 months ago

I solved this problem by manually changing the dependency version of toml from 0.5 to 0.7 in my local .cargo/src/.../mdbook-svgbob-0.2.1/cargo.toml