mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -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