From f4f4fe2e03b402c39e2966843dcb158fabbd3811 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Sun, 26 Apr 2020 18:51:08 -0400 Subject: [PATCH] wrap match in Ok rather than all branches --- src/builtin/meta.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/builtin/meta.rs b/src/builtin/meta.rs index 352b768..65aa424 100644 --- a/src/builtin/meta.rs +++ b/src/builtin/meta.rs @@ -25,24 +25,24 @@ pub(crate) fn register(f: &mut HashMap) { Builtin::new(|mut args, scope, super_selector| { args.max_args(1)?; match arg!(args, scope, super_selector, 0, "feature") { - Value::Ident(s, _) => match s.as_str() { + Value::Ident(s, _) => Ok(match s.as_str() { // A local variable will shadow a global variable unless // `!global` is used. - "global-variable-shadowing" => Ok(Value::True), + "global-variable-shadowing" => Value::True, // the @extend rule will affect selectors nested in pseudo-classes // like :not() - "extend-selector-pseudoclass" => Ok(Value::False), + "extend-selector-pseudoclass" => Value::False, // Full support for unit arithmetic using units defined in the // [Values and Units Level 3][] spec. - "units-level-3" => Ok(Value::True), + "units-level-3" => Value::True, // The Sass `@error` directive is supported. - "at-error" => Ok(Value::True), + "at-error" => Value::True, // The "Custom Properties Level 1" spec is supported. This means // that custom properties are parsed statically, with only // interpolation treated as SassScript. - "custom-property" => Ok(Value::False), - _ => Ok(Value::False), - }, + "custom-property" => Value::False, + _ => Value::False, + }), v => Err(( format!( "$feature: {} is not a string.",