Fix clippy warnings in toolkit/components/kvstore
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(Not tracked)
People
(Reporter: Sylvestre, Unassigned, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=rust])
Filing as a good first bug to learn workflows.
The crate in toolkit/components/kvstore triggers clippy warnings from the default lint set. Fix them all in a single patch; each one is a small, mechanical change and clippy's output suggests the fix.
Warnings and links to the code:
toolkit/components/kvstore/src/fs.rs:52:56: deref which would be done by auto-deref [clippy::explicit_auto_deref]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/fs.rs#52
toolkit/components/kvstore/src/owned_value.rs:56:41: deref which would be done by auto-deref [clippy::explicit_auto_deref]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/owned_value.rs#56
toolkit/components/kvstore/src/task.rs:298:18: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#298
toolkit/components/kvstore/src/task.rs:398:30: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#398
toolkit/components/kvstore/src/task.rs:411:18: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#411
toolkit/components/kvstore/src/task.rs:470:29: manual implementation of Option::map [clippy::manual_map]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#470
toolkit/components/kvstore/src/task.rs:569:14: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#569
toolkit/components/kvstore/src/task.rs:579:14: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#579
toolkit/components/kvstore/src/task.rs:626:14: unnecessary semicolon [clippy::unnecessary_semicolon]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#626
toolkit/components/kvstore/src/task.rs:703:62: this expression creates a reference which is immediately dereferenced by the compiler [clippy::needless_borrow]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/toolkit/components/kvstore/src/task.rs#703
To verify the fix:
./mach lint -W -l clippy toolkit/components/kvstore
The warnings above should no longer be reported, and the code should still build (./mach build).
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Description
•