Skip to content

Freshen some dependencies and avoid warnings #65

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ simple_logger = "4"
colored = "2.0.0"
pulldown-cmark = "0.9"
rayon = "1.3"
time = { version = "0.3", features = ["local-offset"] }
time = { version = "0.3.41", features = ["local-offset"] }
petgraph = "0.6"

[lib]
Expand All @@ -37,3 +37,6 @@ path = "src/lib.rs"
assert_cmd = "2.0"
predicates = "3"
assert_fs = "1.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ pub struct ParsedFile {
pub defines: Defines,
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
pub fn print_parse_error(
printer: &mut printer::Printer,
error: &SvParserError,
Expand Down
14 changes: 7 additions & 7 deletions src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ impl Default for Printer {
}

impl Printer {
#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
pub fn new() -> Printer {
Printer {
term: term::stdout(),
}
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
fn write(&mut self, dat: &str, color: Color) {
if let Some(ref mut term) = self.term {
let term_color = match color {
Expand Down Expand Up @@ -113,7 +113,7 @@ impl Printer {
}
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
fn with_pos<F: FnMut(usize, usize, usize, usize, Option<usize>)>(
src: &str,
print_pos: usize,
Expand Down Expand Up @@ -150,7 +150,7 @@ impl Printer {
}
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
fn print_single(
&mut self,
src: &str,
Expand Down Expand Up @@ -179,7 +179,7 @@ impl Printer {
});
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
fn print_pretty(
&mut self,
src: &str,
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Printer {
});
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
pub fn print_parse_error(
&mut self,
path: &Path,
Expand All @@ -286,7 +286,7 @@ impl Printer {
Ok(())
}

#[cfg_attr(tarpaulin, skip)]
#[cfg(not(tarpaulin_include))]
pub fn print_error(&mut self, error: &str) -> Result<(), Error> {
self.write("Error", Color::BrightRed);
self.write(&format!(": {}", error), Color::BrightWhite);
Expand Down