mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Fix reported test-tidy errors
This fixes lines that were reported to have missing space after a comma.
This commit is contained in:
parent
24bc6dfb52
commit
d61a6e2161
13 changed files with 19 additions and 19 deletions
|
@ -76,7 +76,7 @@ impl<K: Clone + PartialEq, V: Clone> LRUCache<K, V> {
|
|||
self.entries[last_index].1.clone()
|
||||
}
|
||||
|
||||
pub fn iter<'a>(&'a self) -> Iter<'a,(K, V)> {
|
||||
pub fn iter<'a>(&'a self) -> Iter<'a, (K, V)> {
|
||||
self.entries.iter()
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ pub enum OptionalIpcSender<T> where T: Deserialize + Serialize + Send + Any {
|
|||
}
|
||||
|
||||
impl<T> OptionalIpcSender<T> where T: Deserialize + Serialize + Send + Any {
|
||||
pub fn send(&self, value: T) -> Result<(),()> {
|
||||
pub fn send(&self, value: T) -> Result<(), ()> {
|
||||
match *self {
|
||||
OptionalIpcSender::OutOfProcess(ref ipc_sender) => ipc_sender.send(value),
|
||||
OptionalIpcSender::InProcess(ref sender) => sender.send(value).map_err(|_| ()),
|
||||
|
|
|
@ -435,7 +435,7 @@ pub fn from_cmdline_args(args: &[String]) {
|
|||
opts.optflag("i", "nonincremental-layout", "Enable to turn off incremental layout.");
|
||||
opts.optflag("", "no-ssl", "Disables ssl certificate verification.");
|
||||
opts.optflagopt("", "userscripts",
|
||||
"Uses userscripts in resources/user-agent-js, or a specified full path","");
|
||||
"Uses userscripts in resources/user-agent-js, or a specified full path", "");
|
||||
opts.optmulti("", "user-stylesheet",
|
||||
"A user stylesheet to be added to every document", "file.css");
|
||||
opts.optflag("z", "headless", "Headless mode");
|
||||
|
|
|
@ -169,7 +169,7 @@ pub fn parse_length(mut value: &str) -> LengthOrPercentageOrAuto {
|
|||
}
|
||||
|
||||
/// Parses a legacy color per HTML5 § 2.4.6. If unparseable, `Err` is returned.
|
||||
pub fn parse_legacy_color(mut input: &str) -> Result<RGBA,()> {
|
||||
pub fn parse_legacy_color(mut input: &str) -> Result<RGBA, ()> {
|
||||
// Steps 1 and 2.
|
||||
if input.is_empty() {
|
||||
return Err(())
|
||||
|
@ -277,7 +277,7 @@ pub fn parse_legacy_color(mut input: &str) -> Result<RGBA,()> {
|
|||
alpha: 1.0,
|
||||
});
|
||||
|
||||
fn hex(ch: char) -> Result<u8,()> {
|
||||
fn hex(ch: char) -> Result<u8, ()> {
|
||||
match ch {
|
||||
'0'...'9' => Ok((ch as u8) - b'0'),
|
||||
'a'...'f' => Ok((ch as u8) - b'a' + 10),
|
||||
|
@ -286,7 +286,7 @@ pub fn parse_legacy_color(mut input: &str) -> Result<RGBA,()> {
|
|||
}
|
||||
}
|
||||
|
||||
fn hex_string(string: &[u8]) -> Result<u8,()> {
|
||||
fn hex_string(string: &[u8]) -> Result<u8, ()> {
|
||||
match string.len() {
|
||||
0 => Err(()),
|
||||
1 => hex(string[0] as char),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue