Skip to content

Commit

Permalink
Update Rust crate log to v0.4.25 (#13)
Browse files Browse the repository at this point in the history
* Update Rust crate log to v0.4.25

* Fix Clippy warnings

* Fix `wasm_bindgen_unstable_test_coverage`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniëlle Huisman <[email protected]>
  • Loading branch information
renovate[bot] and DanielleHuisman authored Jan 28, 2025
1 parent f1ab24d commit 7e6f436
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 33 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/dom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ web-sys = { workspace = true, features = [
indoc = "2.0.5"
mockall = "0.13.0"
wasm-bindgen-test.workspace = true

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(wasm_bindgen_unstable_test_coverage)',
] }
60 changes: 30 additions & 30 deletions packages/dom/src/queries/role.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if selected.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaSelected)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaSelected))
{
return Err(QueryError::Unsupported(format!(
"`aria-selected` is not supported on role \"{role}\"."
Expand All @@ -59,9 +59,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if busy.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaBusy)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaBusy))
{
return Err(QueryError::Unsupported(format!(
"`aria-busy` is not supported on role \"{role}\"."
Expand All @@ -70,9 +70,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if checked.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaChecked)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaChecked))
{
return Err(QueryError::Unsupported(format!(
"`aria-checked` is not supported on role \"{role}\"."
Expand All @@ -81,9 +81,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if pressed.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaPressed)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaPressed))
{
return Err(QueryError::Unsupported(format!(
"`aria-pressed` is not supported on role \"{role}\"."
Expand All @@ -94,9 +94,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(
// All currently released ARIA versions support `aria-current` on all roles.
// Leaving this for symmetry and forward compatibility.
if current.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaCurrent)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaCurrent))
{
return Err(QueryError::Unsupported(format!(
"`aria-current` is not supported on role \"{role}\"."
Expand All @@ -112,9 +112,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if value_now.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaValuenow)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaValuenow))
{
return Err(QueryError::Unsupported(format!(
"`aria-valuenow` is not supported on role \"{role}\"."
Expand All @@ -123,9 +123,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if value_max.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaValuemax)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaValuemax))
{
return Err(QueryError::Unsupported(format!(
"`aria-valuemax` is not supported on role \"{role}\"."
Expand All @@ -134,9 +134,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if value_min.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaValuemin)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaValuemin))
{
return Err(QueryError::Unsupported(format!(
"`aria-valuemin` is not supported on role \"{role}\"."
Expand All @@ -145,9 +145,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if value_text.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaValuetext)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaValuetext))
{
return Err(QueryError::Unsupported(format!(
"`aria-valuetext` is not supported on role \"{role}\"."
Expand All @@ -156,9 +156,9 @@ pub fn _query_all_by_role<M: Into<ByRoleMatcher>>(

// Guard against unknown roles.
if expanded.is_some()
&& !ROLES.get(&role.into()).map_or(false, |role| {
role.props.contains_key(&AriaProperty::AriaExpanded)
})
&& !ROLES
.get(&role.into())
.is_some_and(|role| role.props.contains_key(&AriaProperty::AriaExpanded))
{
return Err(QueryError::Unsupported(format!(
"`aria-expanded` is not supported on role \"{role}\"."
Expand Down

0 comments on commit 7e6f436

Please sign in to comment.