From 4f9869142fdbe576463d3e6d115630d82f77ecea Mon Sep 17 00:00:00 2001 From: Will Lillis Date: Sat, 28 Dec 2024 01:17:04 -0500 Subject: [PATCH] fix(rust): adapt to a few new nightly lints --- cli/src/tests/query_test.rs | 3 ++- xtask/src/fetch.rs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/src/tests/query_test.rs b/cli/src/tests/query_test.rs index 7b0029a0..cf38e90d 100644 --- a/cli/src/tests/query_test.rs +++ b/cli/src/tests/query_test.rs @@ -5337,11 +5337,12 @@ fn test_query_execution_with_timeout() { } #[test] -fn idk() { +fn test_query_execution_with_points_causing_underflow() { let language = get_language("rust"); let mut parser = Parser::new(); parser.set_language(&language).unwrap(); + #[allow(clippy::literal_string_with_formatting_args)] let code = r#"fn main() { println!("{:?}", foo()); }"#; diff --git a/xtask/src/fetch.rs b/xtask/src/fetch.rs index f48373db..41d5f52c 100644 --- a/xtask/src/fetch.rs +++ b/xtask/src/fetch.rs @@ -47,7 +47,7 @@ pub fn run_fixtures() -> Result<()> { ]); bail_on_err( &command.spawn()?.wait_with_output()?, - "Failed to clone the {grammar} grammar", + &format!("Failed to clone the {grammar} grammar"), )?; } @@ -57,14 +57,14 @@ pub fn run_fixtures() -> Result<()> { command.args(["fetch", "origin", r#ref, "--depth", "1"]); bail_on_err( &command.spawn()?.wait_with_output()?, - "Failed to fetch the {grammar} grammar", + &format!("Failed to fetch the {grammar} grammar"), )?; let mut command = Command::new("git"); command.args(["reset", "--hard", "FETCH_HEAD"]); bail_on_err( &command.spawn()?.wait_with_output()?, - "Failed to reset the {grammar} grammar", + &format!("Failed to reset the {grammar} grammar"), )?; Ok(())