Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2018-ification changes include:
extern crate
imports (except for ones annotated with#[macro_use]
to prevent touching more files; maybe in a follow-up)use serde_json;
-- thecode already uses
serde_json::*
where necessaryMinor formatting changes include:
use std::io::Read; use std::io::BufRead
->use std::io::{BufRead, Read};
crate
imports from external imports fromstd
imports --this is how many project seem to order their imports, most notably the
official Rust repo
use
s from the first line to below the file's doc comment///
to//!
(so they actuallyshow up as documentation)
rustfmt
messing with thenom
macros insrc/commentparser.rs
Most of the 2018-ification was done by
cargo fix --edition-idioms
, butall changes were manually inspected to catch any detrimental changes,
and
cargo test
/cargo check
still succeed.Verified code impact (none) with
cd ofborg && nix-shell ../shell.nix --run 'cargo check && cargo test'
.Supercedes #417.
Small note: when I ran
cargo fix --edition-idioms
, it introduced anonymous lifetimes (<'_>
) to a few structs. I undid this change for the sole reason that I am still unfamiliar with lifetimes.rust_2018_idioms
is the lint that notices this -- reason being:hidden lifetime parameters in types are deprecated
. If this is desirable, I can add it back in (currently sitting in agit stash
entry).