apply new rustfmt.toml changes, fix some clippy lints
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
0317cc8cc5
commit
77e0b76408
296 changed files with 7147 additions and 4300 deletions
|
@ -19,7 +19,9 @@ impl<T, E> FlatOk<T> for Option<Result<T, E>> {
|
|||
fn flat_ok_or<Ep>(self, err: Ep) -> Result<T, Ep> { self.flat_ok().ok_or(err) }
|
||||
|
||||
#[inline]
|
||||
fn flat_ok_or_else<Ep, F: FnOnce() -> Ep>(self, err: F) -> Result<T, Ep> { self.flat_ok().ok_or_else(err) }
|
||||
fn flat_ok_or_else<Ep, F: FnOnce() -> Ep>(self, err: F) -> Result<T, Ep> {
|
||||
self.flat_ok().ok_or_else(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, E> FlatOk<T> for Result<Option<T>, E> {
|
||||
|
@ -30,5 +32,7 @@ impl<T, E> FlatOk<T> for Result<Option<T>, E> {
|
|||
fn flat_ok_or<Ep>(self, err: Ep) -> Result<T, Ep> { self.flat_ok().ok_or(err) }
|
||||
|
||||
#[inline]
|
||||
fn flat_ok_or_else<Ep, F: FnOnce() -> Ep>(self, err: F) -> Result<T, Ep> { self.flat_ok().ok_or_else(err) }
|
||||
fn flat_ok_or_else<Ep, F: FnOnce() -> Ep>(self, err: F) -> Result<T, Ep> {
|
||||
self.flat_ok().ok_or_else(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,5 +20,7 @@ pub trait LogErr<T, E: Display> {
|
|||
|
||||
impl<T, E: Display> LogErr<T, E> for Result<T, E> {
|
||||
#[inline]
|
||||
fn err_log(self, level: Level) -> Self { self.inspect_err(|error| error::inspect_log_level(&error, level)) }
|
||||
fn err_log(self, level: Level) -> Self {
|
||||
self.inspect_err(|error| error::inspect_log_level(&error, level))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue