Run rustfmt

This commit is contained in:
Brian Anderson 2019-04-04 21:32:56 +00:00 committed by gnzlbg
parent fae1357e79
commit 522c032dc3
1 changed files with 15 additions and 13 deletions

View File

@ -54,11 +54,15 @@ impl StdError for Error {
fn description(&self) -> &str {
match description(self.0.get() as c_int) {
Some(m) => m,
None => "Unknown error"
None => "Unknown error",
}
}
fn cause(&self) -> Option<&dyn StdError> { None }
fn source(&self) -> Option<&(dyn StdError + 'static)> { None }
fn cause(&self) -> Option<&dyn StdError> {
None
}
fn source(&self) -> Option<&(dyn StdError + 'static)> {
None
}
}
fn description(code: c_int) -> Option<&'static str> {
@ -67,23 +71,21 @@ fn description(code: c_int) -> Option<&'static str> {
"`newp` is not `NULL`, and `newlen` is too large or too \
small. Alternatively, `*oldlenp` is too large or too \
small; in this case as much data as possible are read \
despite the error."
),
libc::ENOENT => Some(
"`name` or `mib` specifies an unknown/invalid value."
despite the error.",
),
libc::ENOENT => {
Some("`name` or `mib` specifies an unknown/invalid value.")
}
libc::EPERM => Some(
"Attempt to read or write `void` value, or attempt to \
write read-only value."
),
libc::EAGAIN => Some(
"A memory allocation failure occurred."
write read-only value.",
),
libc::EAGAIN => Some("A memory allocation failure occurred."),
libc::EFAULT => Some(
"An interface with side effects failed in some way not \
directly related to `mallctl*()` read/write processing."
directly related to `mallctl*()` read/write processing.",
),
_ => None
_ => None,
}
}