From cbe9cd9133a0efdd5d7f5cc0c22e03c7736d43d9 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 27 Sep 2023 11:31:03 -0400 Subject: [PATCH 1/2] xtask: appease new clippy warning ``` warning: unnecessary hashes around raw string literal --> xtask/src/docs.rs:70:17 | 70 | indoc! {r#" | _________________^ 71 | | User-Agent:* 72 | | Disallow: / 73 | | "#}, | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes = note: `#[warn(clippy::needless_raw_string_hashes)]` on by default help: remove all the hashes around the literal | 70 ~ indoc! {r" 71 | User-Agent:* 72 | Disallow: / 73 ~ "}, | ``` This false negative was fixed in https://github.com/rust-lang/rust-clippy/pull/11518 (the title incorrectly says false positive). --- xtask/src/docs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtask/src/docs.rs b/xtask/src/docs.rs index 0fb13d35..2e8abc96 100644 --- a/xtask/src/docs.rs +++ b/xtask/src/docs.rs @@ -67,10 +67,10 @@ pub fn docs(metadata: Metadata) -> Result<()> { fs::write( site.join("robots.txt"), - indoc! {r#" + indoc! {r" User-Agent:* Disallow: / - "#}, + "}, ) .context("can't write robots.txt")?; From fe13b2eb4117d89a9f47004489e3c3f6e9526618 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 27 Sep 2023 11:39:02 -0400 Subject: [PATCH 2/2] xtask: remove useless copy /tmp/initrd.img is unused. --- xtask/src/run.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/xtask/src/run.rs b/xtask/src/run.rs index 2deca1ad..a9ba17f4 100644 --- a/xtask/src/run.rs +++ b/xtask/src/run.rs @@ -345,8 +345,6 @@ pub fn run(opts: Options) -> Result<()> { bail!("{gen_init_cpio:?} failed: {output:?}") } - copy(&initrd_image, "/tmp/initrd.img").context("copy failed")?; - let mut qemu = Command::new(format!("qemu-system-{guest_arch}")); if let Some(machine) = machine { qemu.args(["-machine", machine]);