Use rustfmt to enforce consistent formatting
This change adds a .rustfmt.toml that includes ALL supported settings, 12 of which we have overridden to attempt to cater to our own proclivities. rustfmt is checked in the rust-nightly CI job.
This commit is contained in:
12
src/error.rs
12
src/error.rs
@@ -44,13 +44,17 @@ impl From<proto::Error> for Error {
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(src: io::Error) -> Error {
|
||||
Error { kind: Kind::Io(src) }
|
||||
Error {
|
||||
kind: Kind::Io(src),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Reason> for Error {
|
||||
fn from(src: Reason) -> Error {
|
||||
Error { kind: Kind::Proto(src) }
|
||||
Error {
|
||||
kind: Kind::Proto(src),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +69,9 @@ impl From<SendError> for Error {
|
||||
|
||||
impl From<UserError> for Error {
|
||||
fn from(src: UserError) -> Error {
|
||||
Error { kind: Kind::User(src) }
|
||||
Error {
|
||||
kind: Kind::User(src),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user