boozook / mdbook-svgbob

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

`cargo install mdbook-svgbob` failed #25

Closed HollowMan6 closed 1 year ago

HollowMan6 commented 1 year ago

Rust toolchain: 1.67.0

https://github.com/HollowMan6/mdbook-pdf/actions/runs/4134900407/jobs/7146633379

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
  --> /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-svgbob-0.2.1/src/preprocessor.rs:58:38
   |
58 | ...                   .and_then(|map| map.try_into().map_err(|err| error!("{}", err)).ok())
   |                                       ^^^ -------- required by a bound introduced by this call
   |                                       |
   |                                       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 E0[277](https://github.com/HollowMan6/mdbook-pdf/actions/runs/4134900407/jobs/7146633379#step:6:278)`.
error: could not compile `mdbook-svgbob` due to previous error
AtmanChen commented 1 year ago

I have run into the same issue

HollowMan6 commented 1 year ago

I have run into the same issue

I have submitted a PR for fixing this, you can check it here: https://github.com/boozook/mdbook-svgbob/pull/26

AtmanChen commented 1 year ago

I have run into the same issue

I have submitted a PR for fixing this, you can check it here: #26

Thank you~ I have installed it successfully in google's "comprehensive-rust" course.

mgeisler commented 1 year ago

Thanks @AtmanChen, I just noticed the same problem on our side :smile:

ehuss commented 1 year ago

Sorry, I did not realize that toml was in the public API. I'm going to yank the release and revert the change, there shouldn't need to be anything you need to do.

HollowMan6 commented 1 year ago

Closing as this has been addressed.

DannyRavi commented 11 months ago

cargo install mdbook-svgbob --locked --version 0.2.1

worked for me!!!