mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-09-21 18:15:34 +00:00
Bump up version of crossterm, fix some bugs.
This commit is contained in:
@@ -22,6 +22,11 @@ pub enum RustopError {
|
||||
/// The data provided is the error found.
|
||||
#[fail(display = "ERROR: Invalid error during data collection due to Heim: {}", message)]
|
||||
InvalidHeim { message : String },
|
||||
/// An error when the Crossterm library encounters a problem.
|
||||
///
|
||||
/// The data provided is the error found.
|
||||
#[fail(display = "ERROR: Invalid error due to Crossterm: {}", message)]
|
||||
CrosstermError { message : String },
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for RustopError {
|
||||
@@ -36,6 +41,12 @@ impl From<heim::Error> for RustopError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<crossterm::ErrorKind> for RustopError {
|
||||
fn from(err : crossterm::ErrorKind) -> Self {
|
||||
RustopError::CrosstermError { message : err.to_string() }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::num::ParseIntError> for RustopError {
|
||||
fn from(err : std::num::ParseIntError) -> Self {
|
||||
RustopError::InvalidArg { message : err.to_string() }
|
||||
|
||||
Reference in New Issue
Block a user