badboy / mdbook-toc

A preprocessor for mdbook to add inline Table of Contents support.
Mozilla Public License 2.0
163 stars 20 forks source link

`cargo install mdbook-toc` failed #33

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/7146632370

   Compiling mdbook-toc v0.11.0
error[E0277]: the trait bound `Config: From<Option<&toml::map::Map<std::string::String, toml::value::Value>>>` is not satisfied
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/mdbook-toc-0.11.0/src/lib.rs:82:19
   |
82 |         let cfg = ctx.config.get_preprocessor(self.name()).try_into()?;
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------- required by a bound introduced by this call
   |                   |
   |                   the trait `From<Option<&toml::map::Map<std::string::String, toml::value::Value>>>` is not implemented for `Config`
   |
   = note: required for `Option<&toml::map::Map<std::string::String, toml::value::Value>>` to implement `Into<Config>`
   = note: required for `Config` to implement `TryFrom<Option<&toml::map::Map<std::string::String, toml::value::Value>>>`
   = note: required for `Option<&toml::map::Map<std::string::String, toml::value::Value>>` to implement `TryInto<Config>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `mdbook-toc` due to previous error
warning: build failed, waiting for other jobs to finish...