mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 09:56:07 -05:00
cargo fix --all
* it added "dyn" to trait objects * it changed "..." in patterns to "..=" cargo --version says: "cargo 1.37.0-nightly (545f35425 2019-05-23)"
This commit is contained in:
@@ -56,7 +56,7 @@ pub trait Clocks : Send + Sync + 'static {
|
||||
timeout: StdDuration) -> Result<T, mpsc::RecvTimeoutError>;
|
||||
}
|
||||
|
||||
pub fn retry_forever<C, T, E>(clocks: &C, f: &mut FnMut() -> Result<T, E>) -> T
|
||||
pub fn retry_forever<C, T, E>(clocks: &C, f: &mut dyn FnMut() -> Result<T, E>) -> T
|
||||
where C: Clocks, E: Into<Error> {
|
||||
loop {
|
||||
let e = match f() {
|
||||
|
||||
@@ -47,7 +47,7 @@ impl Error {
|
||||
}
|
||||
|
||||
impl Fail for Error {
|
||||
fn cause(&self) -> Option<&Fail> {
|
||||
fn cause(&self) -> Option<&dyn Fail> {
|
||||
self.inner.cause()
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ pub fn hex(raw: &[u8]) -> String {
|
||||
/// Returns [0, 16) or error.
|
||||
fn dehex_byte(hex_byte: u8) -> Result<u8, ()> {
|
||||
match hex_byte {
|
||||
b'0' ... b'9' => Ok(hex_byte - b'0'),
|
||||
b'a' ... b'f' => Ok(hex_byte - b'a' + 10),
|
||||
b'0' ..= b'9' => Ok(hex_byte - b'0'),
|
||||
b'a' ..= b'f' => Ok(hex_byte - b'a' + 10),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user