Auto merge of #22126 - pyfisch:autoformat, r=jdm

Enforce rustfmt on CI

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22126)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-11-07 08:47:57 -05:00 committed by GitHub
commit da2d9b2228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
609 changed files with 7934 additions and 5334 deletions

View file

@ -19,7 +19,7 @@ use std::fs::{self, File};
use std::io::{self, Read, Write};
use std::path::{Path, PathBuf};
use std::process;
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
use url::{self, Url};
/// Global flags for Servo, currently set on the command line.
@ -814,7 +814,8 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
.or_else(|error| {
warn!("URL parsing failed ({:?}).", error);
Err(error)
}).ok()
})
.ok()
});
let tile_size: usize = match opt_match.opt_str("s") {
@ -940,7 +941,8 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
r.parse().unwrap_or_else(|err| {
args_fail(&format!("Error parsing option: --resolution ({})", err))
})
}).collect();
})
.collect();
TypedSize2D::new(res[0], res[1])
},
None => TypedSize2D::new(1024, 740),
@ -970,7 +972,8 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
.read_to_end(&mut contents)
.unwrap_or_else(|err| args_fail(&format!("Couldn't read {}: {}", filename, err)));
(contents, url)
}).collect();
})
.collect();
let do_not_use_native_titlebar = opt_match.opt_present("b") || !PREFS
.get("shell.native-titlebar.enabled")

View file

@ -11,7 +11,7 @@ use std::borrow::ToOwned;
use std::cmp::max;
use std::collections::HashMap;
use std::fs::File;
use std::io::{Read, Write, stderr};
use std::io::{stderr, Read, Write};
use std::path::PathBuf;
use std::sync::{Arc, RwLock};
@ -192,7 +192,8 @@ fn init_user_prefs(path: &mut PathBuf) {
writeln!(
&mut stderr(),
"Error opening prefs.json from config directory"
).expect("failed printing to stderr");
)
.expect("failed printing to stderr");
}
}

View file

@ -4,7 +4,7 @@
extern crate servo_config;
use servo_config::opts::{parse_url_or_filename, parse_pref_from_command_line};
use servo_config::opts::{parse_pref_from_command_line, parse_url_or_filename};
use servo_config::prefs::{PrefValue, PREFS};
use std::path::Path;

View file

@ -5,7 +5,7 @@
extern crate servo_config;
use servo_config::basedir;
use servo_config::prefs::{PREFS, PrefValue, read_prefs};
use servo_config::prefs::{read_prefs, PrefValue, PREFS};
use std::fs::{self, File};
use std::io::{Read, Write};