mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
50b9fee3a7
@ -171,16 +171,16 @@ impl Display for ContentRangeSpec {
|
|||||||
range,
|
range,
|
||||||
instance_length,
|
instance_length,
|
||||||
} => {
|
} => {
|
||||||
try!(f.write_str("bytes "));
|
f.write_str("bytes ")?;
|
||||||
match range {
|
match range {
|
||||||
Some((first_byte, last_byte)) => {
|
Some((first_byte, last_byte)) => {
|
||||||
try!(write!(f, "{}-{}", first_byte, last_byte));
|
write!(f, "{}-{}", first_byte, last_byte)?;
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
try!(f.write_str("*"));
|
f.write_str("*")?;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
try!(f.write_str("/"));
|
f.write_str("/")?;
|
||||||
if let Some(v) = instance_length {
|
if let Some(v) = instance_length {
|
||||||
write!(f, "{}", v)
|
write!(f, "{}", v)
|
||||||
} else {
|
} else {
|
||||||
@ -191,8 +191,8 @@ impl Display for ContentRangeSpec {
|
|||||||
ref unit,
|
ref unit,
|
||||||
ref resp,
|
ref resp,
|
||||||
} => {
|
} => {
|
||||||
try!(f.write_str(unit));
|
f.write_str(unit)?;
|
||||||
try!(f.write_str(" "));
|
f.write_str(" ")?;
|
||||||
f.write_str(resp)
|
f.write_str(resp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ impl<T: PartialEq> cmp::PartialOrd for QualityItem<T> {
|
|||||||
|
|
||||||
impl<T: fmt::Display> fmt::Display for QualityItem<T> {
|
impl<T: fmt::Display> fmt::Display for QualityItem<T> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
try!(fmt::Display::fmt(&self.item, f));
|
fmt::Display::fmt(&self.item, f)?;
|
||||||
match self.quality.0 {
|
match self.quality.0 {
|
||||||
1000 => Ok(()),
|
1000 => Ok(()),
|
||||||
0 => f.write_str("; q=0"),
|
0 => f.write_str("; q=0"),
|
||||||
|
Loading…
Reference in New Issue
Block a user