Skip to content

Commit

Permalink
Merge pull request #665 from thoth-pub/feature/rustc_1.84.0_linting
Browse files Browse the repository at this point in the history
Fix new Clippy lint under rustc 1.84.0: remove unnecessary map_or()
  • Loading branch information
rhigman authored Jan 13, 2025
2 parents 314d024 + 030406f commit 6c636ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- [665](https://github.com/thoth-pub/thoth/pull/665) - Removed unnecessary map_or() to comply with [`rustc 1.84.0`](https://github.com/rust-lang/rust/releases/tag/1.84.0)


## [[0.13.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.13.4) - 2024-12-11
Expand Down
2 changes: 1 addition & 1 deletion thoth-api/src/graphql/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ impl MutationRoot {
Some(vec![LocationPlatform::Thoth]),
)?
.first()
.map_or(false, |location| location.canonical);
.is_some_and(|location| location.canonical);
// Only superusers can update the canonical location when a Thoth Location Platform canonical location already exists
if has_canonical_thoth_location && data.canonical && !context.account_access.is_superuser {
return Err(ThothError::ThothUpdateCanonicalError.into());
Expand Down

0 comments on commit 6c636ee

Please sign in to comment.