Closed kalindkaria closed 3 years ago
mdbook-toc is currently build against mdbook 0.3 draft chapters seem to be in 0.4
So I guess it's just unable to parse that. Should be easy to do to upgrade the dependency, but I won't get to it before next week.
Oh okay. Can you tell me how to do it at my local end? As I really need this feature in the docs I'm building for a project.
Update the version number here: https://github.com/badboy/mdbook-toc/blob/master/Cargo.toml#L12 Build it (hope it works), then run it (and hope it works)
I did that and tried to built it, but it didn't compile due to the error below:
error[E0277]: the trait bound `std::string::String: std::error::Error` is not satisfied
--> src/lib.rs:148:36
|
148 | .map_err(|err| Error::from(format!("Markdown serialization failed: {}", err)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `std::string::String`
|
= note: required because of the requirements on the impl of `std::convert::From<std::string::String>` for `mdbook::errors::Error`
= note: required by `std::convert::From::from`
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: could not compile `mdbook-toc`.
I'm new to Rust language so I could understand that there's a type mismatching for the standard trait "Error" with the one called in lib.rs
.
Can you help me rectify it?
Can you help me rectify it?
Yes, next week.
Done in v0.5
Thanks. 👍🏻
Hi @badboy You might know that mdBook has the feature of having Draft Chapters with the pull request rust-lang/mdBook#1153. When I use this feature along with
mdbook-toc
, the preprocessor fails with the output below.Do you know the reason of this issue? Kindly shed some light. Thanks.