Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Oct 21, 2023
1 parent d14c92c commit ba0a400
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cargo-dylint/tests/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ libraries = [
predicate::str::is_match(r#"Could not canonicalize "[^"]*""#)
.unwrap()
.or(predicate::str::is_match(
r#"Pattern `[^`]*` could refer to `[^`]*`, which is outside of `[^`]*`"#,
r"Pattern `[^`]*` could refer to `[^`]*`, which is outside of `[^`]*`",
)
.unwrap()),
);
Expand Down
8 changes: 4 additions & 4 deletions dylint/src/driver_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ use tempfile::tempdir;

include!(concat!(env!("OUT_DIR"), "/dylint_driver_manifest_dir.rs"));

const README_TXT: &str = r#"
const README_TXT: &str = "
This directory contains Rust compiler drivers used by Dylint
(https://github.com/trailofbits/dylint).
Deleting this directory will cause Dylint to rebuild the drivers
the next time it needs them, but will have no ill effects.
"#;
";

fn cargo_toml(toolchain: &str, dylint_driver_spec: &str) -> String {
format!(
Expand Down Expand Up @@ -49,7 +49,7 @@ components = ["llvm-tools-preview", "rustc-dev"]
)
}

const MAIN_RS: &str = r#"
const MAIN_RS: &str = r"
use anyhow::Result;
use std::env;
use std::ffi::OsString;
Expand All @@ -61,7 +61,7 @@ pub fn main() -> Result<()> {
dylint_driver::dylint_driver(&args)
}
"#;
";

#[cfg_attr(
dylint_lib = "question_mark_in_expression",
Expand Down
4 changes: 2 additions & 2 deletions dylint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ fn check_or_fix(opts: &Dylint, resolved: &ToolchainMap) -> Result<()> {
.append(true)
.create(true)
.open(stderr_path)
.with_context(|| format!("Failed to open `{}` for stderr usage", stderr_path))?;
.with_context(|| format!("Failed to open `{stderr_path}` for stderr usage"))?;
command.stderr(file);
}

Expand All @@ -532,7 +532,7 @@ fn check_or_fix(opts: &Dylint, resolved: &ToolchainMap) -> Result<()> {
.append(true)
.create(true)
.open(stdout_path)
.with_context(|| format!("Failed to open `{}` for stdout usage", stdout_path))?;
.with_context(|| format!("Failed to open `{stdout_path}` for stdout usage"))?;
command.stdout(file);
}

Expand Down

0 comments on commit ba0a400

Please sign in to comment.