Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 1, 2024
1 parent 013ef24 commit cd6124b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/biome_aria/src/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1242,8 +1242,8 @@ impl<'a> AriaRoles {
false
}

/// Given a role, it returns the corresponding element and attributes
pub fn get_corresponding_element(&self, role: &str) -> Option<Iter<(&str, &[(&str, &str)])>> {
/// Given a role, it returns the corresponding elements and attributes associated to that role
pub fn get_elements_by_role(&self, role: &str) -> ElementsAndAttributes {
let role_candidate = match role {
"checkbox" => &CheckboxRole as &dyn AriaRoleDefinitionWithConcepts,
"radio" => &RadioRole as &dyn AriaRoleDefinitionWithConcepts,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Rule for UseSemanticElements {

let static_value = role_attribute.as_static_value()?;
let role_value = static_value.as_string_constant()?;
let candidate = AriaRoles.get_corresponding_element(role_value);
let candidate = AriaRoles.get_elements_by_role(role_value);

let mut result_elements: Vec<&str> = vec![];
let mut result_attributes: Vec<(&str, &str)> = vec![];
Expand Down

0 comments on commit cd6124b

Please sign in to comment.