Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace map_or with is_ok_and and is_some_and #4969

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

unvalley
Copy link
Member

@unvalley unvalley commented Jan 25, 2025

Summary

Enables unnecessary_map_or clippy lint rule, it was added as a default in 1.84.0.
https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or

Test Plan

@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS A-Diagnostic Area: diagnostocis L-HTML Language: HTML L-Grit Language: GritQL labels Jan 25, 2025
@unvalley unvalley marked this pull request as draft January 25, 2025 05:22
Copy link

codspeed-hq bot commented Jan 25, 2025

CodSpeed Performance Report

Merging #4969 will not alter performance

Comparing unvalley:use-unnecessary-map-or (8aeae72) with next (bdc34a1)

Summary

✅ 95 untouched benchmarks

@unvalley unvalley force-pushed the use-unnecessary-map-or branch from 3e9f308 to bd0f78f Compare January 26, 2025 11:44
@github-actions github-actions bot added the L-JSON Language: JSON and super languages label Jan 26, 2025
@unvalley unvalley force-pushed the use-unnecessary-map-or branch from bd0f78f to ad39292 Compare January 26, 2025 11:53
chore: format

refactor: fix lint

refactor: restore changes that map_or default is true

Discard changes to crates/biome_service/src/file_handlers/mod.rs

Discard changes to xtask/coverage/src/js/test262.rs

Discard changes to crates/biome_analyze/src/lib.rs

Discard changes to crates/biome_grit_patterns/src/pattern_compiler/call_compiler.rs

chore: fix

fix: regression
@unvalley unvalley force-pushed the use-unnecessary-map-or branch from ad39292 to 8aeae72 Compare January 26, 2025 12:09
@unvalley unvalley marked this pull request as ready for review January 26, 2025 12:33
@unvalley unvalley changed the title refactor: replace map_or with is_ok_and and is_some_and refactor: replace map_or with is_ok_and and is_some_and Jan 26, 2025
@unvalley unvalley merged commit 5184067 into biomejs:next Jan 26, 2025
14 checks passed
@unvalley unvalley deleted the use-unnecessary-map-or branch January 26, 2025 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Core Area: core A-Diagnostic Area: diagnostocis A-Formatter Area: formatter A-Linter Area: linter A-Parser Area: parser A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS L-Grit Language: GritQL L-HTML Language: HTML L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants