remove deprecated try macros

This commit is contained in:
Rob Ede 2020-05-01 23:48:02 +01:00
parent aa12502aed
commit 2052a37462
No known key found for this signature in database
GPG Key ID: C2A3B36E841A91E6
3 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,8 @@ use fxhash::FxHashMap;
#[derive(Default)]
/// A type map of request extensions.
pub struct Extensions {
/// Use FxHasher with a std HashMap with for faster
/// lookups on the small `TypeId` (u64 equivalent) keys.
map: FxHashMap<TypeId, Box<dyn Any>>,
}

View File

@ -183,13 +183,13 @@ impl fmt::Display for Range {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Range::Bytes(ref ranges) => {
try!(write!(f, "bytes="));
write!(f, "bytes=")?;
for (i, range) in ranges.iter().enumerate() {
if i != 0 {
try!(f.write_str(","));
f.write_str(",")?;
}
try!(Display::fmt(range, f));
Display::fmt(range, f)?;
}
Ok(())
}

View File

@ -123,6 +123,7 @@ impl AppService {
}
}
/// Application connection config
#[derive(Clone)]
pub struct AppConfig(Rc<AppConfigInner>);