From f1e27dda3c16468237a3f1caffc0fcfc7622d3ef Mon Sep 17 00:00:00 2001 From: neoki Date: Wed, 5 Jun 2024 20:49:53 +0900 Subject: [PATCH] refactor --- .../src/lint/nursery/no_shorthand_property_overrides.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_shorthand_property_overrides.rs b/crates/biome_css_analyze/src/lint/nursery/no_shorthand_property_overrides.rs index fbe0d7036e2a..30c5324de090 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_shorthand_property_overrides.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_shorthand_property_overrides.rs @@ -4,7 +4,7 @@ use biome_analyze::{ }; use biome_console::markup; use biome_css_syntax::{AnyCssDeclarationName, CssGenericProperty, CssLanguage, CssSyntaxKind}; -use biome_rowan::{AstNode, Language, SyntaxNode, SyntaxNodeCast, TextRange, WalkEvent}; +use biome_rowan::{AstNode, Language, SyntaxNode, TextRange, WalkEvent}; use crate::utils::{get_longhand_sub_properties, get_reset_to_initial_properties, vender_prefix}; @@ -102,9 +102,7 @@ impl Visitor for NoDeclarationBlockShorthandPropertyOverridesVisitor { self.prior_props_in_block.clear(); } CssSyntaxKind::CSS_GENERIC_PROPERTY => { - if let Some(prop_node) = node - .clone() - .cast::() + if let Some(prop_node) = CssGenericProperty::cast_ref(node) .and_then(|property_node| property_node.name().ok()) { let prop = prop_node.text();