diff --git a/.changes/change-pr-2224.md b/.changes/change-pr-2224.md new file mode 100644 index 0000000000..b1a0f00b9c --- /dev/null +++ b/.changes/change-pr-2224.md @@ -0,0 +1,6 @@ +--- +"shell": patch +"shell-js": patch +--- + +Use &self instead of self to allow kill to be called multiple times. diff --git a/plugins/shell/src/process/mod.rs b/plugins/shell/src/process/mod.rs index 44f037b015..ac801834a7 100644 --- a/plugins/shell/src/process/mod.rs +++ b/plugins/shell/src/process/mod.rs @@ -75,7 +75,7 @@ impl CommandChild { } /// Sends a kill signal to the child. - pub fn kill(self) -> crate::Result<()> { + pub fn kill(&self) -> crate::Result<()> { self.inner.kill()?; Ok(()) }