From 812e9fec9c47c415cfdc032899370873d4849c88 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 24 May 2020 13:50:45 -0400 Subject: [PATCH] rustfmt --- src/value/ops.rs | 5 ++++- src/value/parse.rs | 3 ++- tests/args.rs | 5 ++--- tests/division.rs | 3 +-- tests/selectors.rs | 5 +---- tests/unknown-at-rule.rs | 6 +----- 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/value/ops.rs b/src/value/ops.rs index a0d5275..92da5e7 100644 --- a/src/value/ops.rs +++ b/src/value/ops.rs @@ -628,7 +628,10 @@ impl Value { Self::Dimension(num, unit).div(other.eval(span)?.node, span)? } Self::List(..) | Self::True | Self::False | Self::Important | Self::Color(..) => { - Value::String(format!("{}{}/{}", num, unit, other.to_css_string(span)?), QuoteKind::None) + Value::String( + format!("{}{}/{}", num, unit, other.to_css_string(span)?), + QuoteKind::None, + ) } Self::Null => Value::String(format!("{}{}/", num, unit), QuoteKind::None), Self::Map(..) | Self::Function(..) => { diff --git a/src/value/parse.rs b/src/value/parse.rs index 0aa1252..b81670b 100644 --- a/src/value/parse.rs +++ b/src/value/parse.rs @@ -601,7 +601,8 @@ impl Value { "url" => match try_eat_url(toks, scope, super_selector)? { Some(val) => s = val, None => s.push_str( - &eat_call_args(toks, pos)?.to_css_string(scope, super_selector)?, + &eat_call_args(toks, pos)? + .to_css_string(scope, super_selector)?, ), }, _ => s.push_str( diff --git a/tests/args.rs b/tests/args.rs index 8c8fe90..c2ca456 100644 --- a/tests/args.rs +++ b/tests/args.rs @@ -49,6 +49,5 @@ test!( // and should be "expected \")\"." error!( nothing_after_open, - "a { color:rgb(; }", - "Error: expected \"{\"." -); \ No newline at end of file + "a { color:rgb(; }", "Error: expected \"{\"." +); diff --git a/tests/division.rs b/tests/division.rs index 4668463..f1e4ee9 100644 --- a/tests/division.rs +++ b/tests/division.rs @@ -65,8 +65,7 @@ test!( ); error!( num_div_map, - "a {\n color: 1 / (a: b);\n}\n", - "Error: (a: b) isn't a valid CSS value." + "a {\n color: 1 / (a: b);\n}\n", "Error: (a: b) isn't a valid CSS value." ); error!( num_div_function, diff --git a/tests/selectors.rs b/tests/selectors.rs index bc0f20a..5f8b666 100644 --- a/tests/selectors.rs +++ b/tests/selectors.rs @@ -549,7 +549,4 @@ error!( non_ident_char_after_colon, ":#ab {}", "Error: Expected identifier." ); -error!( - nothing_after_colon, - "a:{}", "Error: Expected identifier." -); +error!(nothing_after_colon, "a:{}", "Error: Expected identifier."); diff --git a/tests/unknown-at-rule.rs b/tests/unknown-at-rule.rs index 1544771..44087c6 100644 --- a/tests/unknown-at-rule.rs +++ b/tests/unknown-at-rule.rs @@ -15,8 +15,4 @@ test!( "@#{()if(0,0<0,0)}", "@false;\n" ); -test!( - nothing_after_hash, - "@foo #", - "@foo #;\n" -); +test!(nothing_after_hash, "@foo #", "@foo #;\n");