diff --git a/helix-term/tests/test/commands/write.rs b/helix-term/tests/test/commands/write.rs index 4b78e14c4..6f2d61258 100644 --- a/helix-term/tests/test/commands/write.rs +++ b/helix-term/tests/test/commands/write.rs @@ -746,7 +746,7 @@ async fn test_hardlink_write() -> anyhow::Result<()> { async fn edit_file_with_content(file_content: &[u8]) -> anyhow::Result<()> { let mut file = tempfile::NamedTempFile::new()?; - file.as_file_mut().write_all(&file_content)?; + file.as_file_mut().write_all(file_content)?; helpers::test_key_sequence( &mut helpers::AppBuilder::new() diff --git a/helix-term/tests/test/helpers.rs b/helix-term/tests/test/helpers.rs index ef910852c..ae919acbd 100644 --- a/helix-term/tests/test/helpers.rs +++ b/helix-term/tests/test/helpers.rs @@ -61,6 +61,7 @@ pub struct TestCase { pub out_text: String, pub out_selection: Selection, + #[allow(dead_code)] pub line_feed_handling: LineFeedHandling, } @@ -425,7 +426,7 @@ pub fn reload_file(file: &mut NamedTempFile) -> anyhow::Result<()> { let f = std::fs::OpenOptions::new() .write(true) .read(true) - .open(&path)?; + .open(path)?; *file.as_file_mut() = f; Ok(()) }