Skip to content

Commit

Permalink
Remove redundant clone()s to make cargo clippy happy.
Browse files Browse the repository at this point in the history
Signed-off-by: Ismo Puustinen <[email protected]>
  • Loading branch information
ipuustin committed Jun 8, 2023
1 parent 51da1b7 commit 9b8a0ef
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions crates/containerd-shim-wasm/src/sandbox/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,9 @@ mod noptests {
fn test_nop_kill_sigkill() -> Result<(), Error> {
let nop = Arc::new(Nop::new("".to_string(), None));
let (tx, rx) = channel();

let n = nop.clone();
let waiter = Wait::new(tx);

n.wait(&waiter).unwrap();

nop.wait(&waiter).unwrap();
nop.kill(SIGKILL as u32)?;
let ec = rx.recv_timeout(Duration::from_secs(3)).unwrap();
assert_eq!(ec.0, 137);
Expand All @@ -235,12 +232,9 @@ mod noptests {
fn test_nop_kill_sigterm() -> Result<(), Error> {
let nop = Arc::new(Nop::new("".to_string(), None));
let (tx, rx) = channel();

let n = nop.clone();
let waiter = Wait::new(tx);

n.wait(&waiter).unwrap();

nop.wait(&waiter).unwrap();
nop.kill(SIGTERM as u32)?;
let ec = rx.recv_timeout(Duration::from_secs(3)).unwrap();
assert_eq!(ec.0, 0);
Expand All @@ -251,12 +245,9 @@ mod noptests {
fn test_nop_kill_sigint() -> Result<(), Error> {
let nop = Arc::new(Nop::new("".to_string(), None));
let (tx, rx) = channel();

let n = nop.clone();
let waiter = Wait::new(tx);

n.wait(&waiter).unwrap();

nop.wait(&waiter).unwrap();
nop.kill(SIGINT as u32)?;
let ec = rx.recv_timeout(Duration::from_secs(3)).unwrap();
assert_eq!(ec.0, 0);
Expand Down

0 comments on commit 9b8a0ef

Please sign in to comment.