summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClementTsang <clementjhtsang@gmail.com>2019-12-06 23:29:23 -0500
committerClementTsang <clementjhtsang@gmail.com>2019-12-06 23:29:23 -0500
commit6ac5812ffdedcf2752920da51dbf75e942d6c58a (patch)
tree750b38c2bb006c3493def8cda5aa49ade01b43b5
parent567283ab1bb92516e932f22ae505e1bbb77913d7 (diff)
Fix travis.
-rw-r--r--src/canvas.rs2
-rw-r--r--src/utils/error.rs36
2 files changed, 19 insertions, 19 deletions
diff --git a/src/canvas.rs b/src/canvas.rs
index ca16f1f1..64d2ea47 100644
--- a/src/canvas.rs
+++ b/src/canvas.rs
@@ -84,7 +84,7 @@ pub fn draw_data<B: backend::Backend>(terminal: &mut Terminal<B>, app_state: &mu
let vertical_chunks = Layout::default()
.direction(Direction::Vertical)
.margin(1)
- .constraints([Constraint::Percentage(34), Constraint::Percentage(34), Constraint::Percentage(33)].as_ref())
+ .constraints([Constraint::Percentage(33), Constraint::Percentage(34), Constraint::Percentage(34)].as_ref())
.split(f.size());
let middle_chunks = Layout::default()
diff --git a/src/utils/error.rs b/src/utils/error.rs
index b38cf962..0a71c7d0 100644
--- a/src/utils/error.rs
+++ b/src/utils/error.rs
@@ -11,66 +11,66 @@ pub enum RustopError {
///
/// The data provided is the error found.
#[fail(display = "ERROR: Encountered an IO exception: {}", message)]
- InvalidIO { message : String },
+ InvalidIO { message: String },
/// An error when there is an invalid argument passed in.
///
/// The data provided is the error found.
#[fail(display = "ERROR: Invalid argument: {}", message)]
- InvalidArg { message : String },
+ InvalidArg { message: String },
/// An error when the heim library encounters a problem.
///
/// The data provided is the error found.
#[fail(display = "ERROR: Invalid error during data collection due to Heim: {}", message)]
- InvalidHeim { message : String },
+ 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 },
+ CrosstermError { message: String },
/// An error to represent generic errors
///
/// The data provided is the error found.
#[fail(display = "ERROR: Invalid generic error: {}", message)]
- GenericError { message : String },
+ GenericError { message: String },
/// An error to represent errors with fern
///
/// The data provided is the error found.
#[fail(display = "ERROR: Invalid fern error: {}", message)]
- FernError { message : String },
+ FernError { message: String },
}
impl From<std::io::Error> for RustopError {
- fn from(err : std::io::Error) -> Self {
- RustopError::InvalidIO { message : err.to_string() }
+ fn from(err: std::io::Error) -> Self {
+ RustopError::InvalidIO { message: err.to_string() }
}
}
impl From<heim::Error> for RustopError {
- fn from(err : heim::Error) -> Self {
- RustopError::InvalidHeim { message : err.to_string() }
+ fn from(err: heim::Error) -> Self {
+ RustopError::InvalidHeim { message: err.to_string() }
}
}
impl From<crossterm::ErrorKind> for RustopError {
- fn from(err : crossterm::ErrorKind) -> Self {
- RustopError::CrosstermError { message : err.to_string() }
+ 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() }
+ fn from(err: std::num::ParseIntError) -> Self {
+ RustopError::InvalidArg { message: err.to_string() }
}
}
impl From<std::string::String> for RustopError {
- fn from(err : std::string::String) -> Self {
- RustopError::GenericError { message : err.to_string() }
+ fn from(err: std::string::String) -> Self {
+ RustopError::GenericError { message: err.to_string() }
}
}
impl From<fern::InitError> for RustopError {
- fn from(err : fern::InitError) -> Self {
- RustopError::FernError { message : err.to_string() }
+ fn from(err: fern::InitError) -> Self {
+ RustopError::FernError { message: err.to_string() }
}
}