Skip to content

Commit

Permalink
Fix usage of drop
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Jan 6, 2024
1 parent 75f0dfc commit 83e9665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;

Check failure on line 537 in src/operations.rs

View workflow job for this annotation

GitHub Actions / check-juliaup (aarch64-apple-darwin)

cannot borrow `child_stdin` as mutable, as it is not declared as mutable

Expand Down Expand Up @@ -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())?;

Check failure on line 586 in src/operations.rs

View workflow job for this annotation

GitHub Actions / check-juliaup (aarch64-apple-darwin)

cannot borrow `child_stdin` as mutable, as it is not declared as mutable

Expand Down

0 comments on commit 83e9665

Please sign in to comment.