make try_status take &self

it doesn't need exclusive access
This commit is contained in:
Jesse Luehrs 2021-12-22 20:20:00 -05:00
parent 327f176ba4
commit 61e10f81be
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ impl Child {
/// }
/// # std::io::Result::Ok(()) });
/// ```
pub fn try_status(&mut self) -> io::Result<Option<ExitStatus>> {
pub fn try_status(&self) -> io::Result<Option<ExitStatus>> {
self.child.lock().unwrap().get_mut().try_wait()
}