-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate to 2021 edition #1831
migrate to 2021 edition #1831
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two fix the failing tests.
@@ -890,8 +892,6 @@ mod tests { | |||
title = "mdBook Documentation" | |||
description = "Create book from markdown files. Like Gitbook but implemented in Rust" | |||
authors = ["Mathieu David"] | |||
src = "./source" | |||
[rust] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test fails because this line was removed—edition
should be in the rust
table.
@@ -588,7 +589,7 @@ impl HtmlConfig { | |||
|
|||
/// Configuration for how to render the print icon, print.html, and print.css. | |||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | |||
#[serde(default, rename_all = "kebab-case")] | |||
#[serde(rename_all = "kebab-case")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the print_config
test fail because the page_break
key is missing.
(Incidentally, this is logged... but tests don't enable logging. Adding the following at the beginning of the test resolves that:
env_logger::builder().is_test(true).try_init().unwrap();
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ISSOtm, wow, thank you very much for debugging this! I wanted to fix the errors on the branch and this one made me scratch my head 😄
Hey @Dylan-DPC, could you update the PR to fix the failing tests? I also wanted to bump the MSRV in #1866 so that I could play with edition 2021 dependencies in #1864. |
Anything I can do to help here? It seems @ISSOtm already debugged the failing tests, so it should be easy to fix. |
Yeah i was busy with other projects so i didnt get the time to finish this. If you wish you can push a commit to my branch or I can look into it in a few days time hopefully |
Hi @Dylan-DPC, it's great to hear that you're still looking at it! I'm about to go on vacation for the rest of the week, so no hurry. Note that I'm just a random guy, I'm not a maintainer or anything like that :-) I just (also) wants to see mdBook move to the new edition :-D |
This was merged in #1887. |
Thanks, closing as resolved by #1887. |
extern crate
for crates that were needed for macros, and replaced with imports in respective modules