From 83e9665464e207498e4060c1e08a723babcdb66a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 6 Jan 2024 11:15:38 +0100 Subject: [PATCH] Fix usage of drop --- src/operations.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operations.rs b/src/operations.rs index 0b23f9af..421dd89c 100644 --- a/src/operations.rs +++ b/src/operations.rs @@ -532,7 +532,7 @@ pub fn install_background_selfupdate(interval: i64) -> Result<()> { .stdout(Stdio::piped()) .spawn()?; - let child_stdin = child.stdin.as_mut().unwrap(); + let child_stdin = child.stdin.take().unwrap(); child_stdin.write_all(new_crontab_content.as_bytes())?; @@ -581,7 +581,7 @@ pub fn uninstall_background_selfupdate() -> Result<()> { .stdout(Stdio::piped()) .spawn()?; - let child_stdin = child.stdin.as_mut().unwrap(); + let child_stdin = child.stdin.take().unwrap(); child_stdin.write_all(new_crontab_content.as_bytes())?;