diff --git a/cursive/Cargo.toml b/cursive/Cargo.toml index f32550f..d0b6f4c 100644 --- a/cursive/Cargo.toml +++ b/cursive/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "cursive" readme = "../Readme.md" repository = "https://github.com/gyscos/cursive" -version = "0.16.2" +version = "0.16.3" edition = "2018" [package.metadata.docs.rs] diff --git a/cursive/src/cursive_runnable.rs b/cursive/src/cursive_runnable.rs index b288107..192cd28 100644 --- a/cursive/src/cursive_runnable.rs +++ b/cursive/src/cursive_runnable.rs @@ -33,6 +33,18 @@ impl std::ops::DerefMut for CursiveRunnable { } } +impl std::borrow::Borrow for CursiveRunnable { + fn borrow(&self) -> &Cursive { + &*self + } +} + +impl std::borrow::BorrowMut for CursiveRunnable { + fn borrow_mut(&mut self) -> &mut Cursive { + &mut *self + } +} + fn boxed(e: impl std::error::Error + 'static) -> Box { Box::new(e) }