aboutsummaryrefslogtreecommitdiff
path: root/nitrocli/src/error.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-17 18:31:42 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-17 18:31:42 -0800
commit97accf1ddd79bb69dfb74742a0518c40830657e4 (patch)
tree2e808cd031e70084f2ae7bce704bd7cab4956b5c /nitrocli/src/error.rs
parent953717e1648359baa8196ae32e01313b82f2561e (diff)
downloadnitrocli-97accf1ddd79bb69dfb74742a0518c40830657e4.tar.gz
nitrocli-97accf1ddd79bb69dfb74742a0518c40830657e4.tar.bz2
Make code conforming to rustfmt's expectations
An automated code formatter can help tremendously in reducing the amount of cognitive energy wasted on thinking about the "best" formatting of code as well as the number of nitpicks reviews typically get -- the format is machine checked (and enforced) and there is usually little to no discussion about the validity. To reach the goal of having such automated enforcement, we want to run the rustfmt tool as part of the CI pipeline. With rustfmt having reached 1.0 recently, the believe is that by now the formatting is reasonably stable and usable for this purpose. In that light, this change formats the code using rustfmt and prepares for such an automated style check.
Diffstat (limited to 'nitrocli/src/error.rs')
-rw-r--r--nitrocli/src/error.rs4
1 files changed, 0 insertions, 4 deletions
diff --git a/nitrocli/src/error.rs b/nitrocli/src/error.rs
index 1b7068d..d755cac 100644
--- a/nitrocli/src/error.rs
+++ b/nitrocli/src/error.rs
@@ -21,7 +21,6 @@ use std::fmt;
use std::io;
use std::string;
-
#[derive(Debug)]
pub enum Error {
IoError(io::Error),
@@ -29,21 +28,18 @@ pub enum Error {
Error(String),
}
-
impl From<io::Error> for Error {
fn from(e: io::Error) -> Error {
Error::IoError(e)
}
}
-
impl From<string::FromUtf8Error> for Error {
fn from(e: string::FromUtf8Error) -> Error {
Error::Utf8Error(e)
}
}
-
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {