mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 19:00:46 +00:00
Update crossterm to 0.11
This commit is contained in:
parent
149beee7b4
commit
d6f5c0e0fa
@ -7,6 +7,7 @@
|
|||||||
- `cursive::event::AnyCb` changed from `Box<...>` to `&mut ...`, so users of
|
- `cursive::event::AnyCb` changed from `Box<...>` to `&mut ...`, so users of
|
||||||
`View::call_on_any` no longer need to box their closures.
|
`View::call_on_any` no longer need to box their closures.
|
||||||
- Remove `BoxView::squishable`.
|
- Remove `BoxView::squishable`.
|
||||||
|
- Update crossterm to 0.11
|
||||||
|
|
||||||
### API updates
|
### API updates
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ version = "1.5.3"
|
|||||||
|
|
||||||
[dependencies.crossterm]
|
[dependencies.crossterm]
|
||||||
optional = true
|
optional = true
|
||||||
version = "0.10.1"
|
version = "0.11"
|
||||||
|
|
||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
signal-hook = "0.1.10"
|
signal-hook = "0.1.10"
|
||||||
|
@ -30,7 +30,7 @@ pub struct Backend {
|
|||||||
|
|
||||||
impl Backend {
|
impl Backend {
|
||||||
/// Creates a new crossterm backend.
|
/// Creates a new crossterm backend.
|
||||||
pub fn init() -> std::io::Result<Box<dyn backend::Backend>>
|
pub fn init() -> Result<Box<dyn backend::Backend>, crossterm::ErrorKind>
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
{
|
{
|
||||||
@ -196,7 +196,7 @@ impl backend::Backend for Backend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn screen_size(&self) -> Vec2 {
|
fn screen_size(&self) -> Vec2 {
|
||||||
let size = self.terminal.terminal_size();
|
let size = self.terminal.size().unwrap_or((0, 0));
|
||||||
Vec2::from(size)
|
Vec2::from(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ impl Cursive {
|
|||||||
|
|
||||||
/// Creates a new Cursive root using a crossterm backend.
|
/// Creates a new Cursive root using a crossterm backend.
|
||||||
#[cfg(feature = "crossterm-backend")]
|
#[cfg(feature = "crossterm-backend")]
|
||||||
pub fn crossterm() -> std::io::Result<Self> {
|
pub fn crossterm() -> Result<Self, crossterm::ErrorKind> {
|
||||||
Self::try_new(backend::crossterm::Backend::init)
|
Self::try_new(backend::crossterm::Backend::init)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user