mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix issues found by rust-clippy
This commit is contained in:
parent
6303126e0c
commit
20beaf5af3
23 changed files with 106 additions and 121 deletions
|
@ -75,10 +75,9 @@ fn send_error(url: Url, err: String, start_chan: LoadConsumer) {
|
|||
let mut metadata: Metadata = Metadata::default(url);
|
||||
metadata.status = None;
|
||||
|
||||
match start_sending_opt(start_chan, metadata) {
|
||||
Ok(p) => p.send(Done(Err(err))).unwrap(),
|
||||
_ => {}
|
||||
};
|
||||
if let Ok(p) = start_sending_opt(start_chan, metadata) {
|
||||
p.send(Done(Err(err))).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
enum ReadResult {
|
||||
|
@ -157,8 +156,8 @@ pub trait HttpResponse: Read {
|
|||
|
||||
fn content_encoding(&self) -> Option<Encoding> {
|
||||
self.headers().get::<ContentEncoding>().and_then(|h| {
|
||||
match h {
|
||||
&ContentEncoding(ref encodings) => {
|
||||
match *h {
|
||||
ContentEncoding(ref encodings) => {
|
||||
if encodings.contains(&Encoding::Gzip) {
|
||||
Some(Encoding::Gzip)
|
||||
} else if encodings.contains(&Encoding::Deflate) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue