mirror of https://github.com/fafhrd91/actix-web
remove deprecated try macros
This commit is contained in:
parent
aa12502aed
commit
2052a37462
|
@ -6,6 +6,8 @@ use fxhash::FxHashMap;
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
/// A type map of request extensions.
|
/// A type map of request extensions.
|
||||||
pub struct 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>>,
|
map: FxHashMap<TypeId, Box<dyn Any>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,13 +183,13 @@ impl fmt::Display for Range {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match *self {
|
match *self {
|
||||||
Range::Bytes(ref ranges) => {
|
Range::Bytes(ref ranges) => {
|
||||||
try!(write!(f, "bytes="));
|
write!(f, "bytes=")?;
|
||||||
|
|
||||||
for (i, range) in ranges.iter().enumerate() {
|
for (i, range) in ranges.iter().enumerate() {
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
try!(f.write_str(","));
|
f.write_str(",")?;
|
||||||
}
|
}
|
||||||
try!(Display::fmt(range, f));
|
Display::fmt(range, f)?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,7 @@ impl AppService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Application connection config
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct AppConfig(Rc<AppConfigInner>);
|
pub struct AppConfig(Rc<AppConfigInner>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue