Fix clippy warnings in intl/l10n/rust/fluent-ffi
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 intl/l10n/rust/fluent-ffi 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:
intl/l10n/rust/fluent-ffi/src/builtins.rs:115:1: this impl can be derived [clippy::derivable_impls]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/builtins.rs#115
intl/l10n/rust/fluent-ffi/src/builtins.rs:142:1: this impl can be derived [clippy::derivable_impls]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/builtins.rs#142
intl/l10n/rust/fluent-ffi/src/builtins.rs:167:1: this impl can be derived [clippy::derivable_impls]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/builtins.rs#167
intl/l10n/rust/fluent-ffi/src/builtins.rs:194:1: this impl can be derived [clippy::derivable_impls]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/builtins.rs#194
intl/l10n/rust/fluent-ffi/src/builtins.rs:221:1: this impl can be derived [clippy::derivable_impls]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/builtins.rs#221
intl/l10n/rust/fluent-ffi/src/bundle.rs:101:51: accessing first element with args.get(0) [clippy::get_first]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/bundle.rs#101
intl/l10n/rust/fluent-ffi/src/bundle.rs:112:51: accessing first element with args.get(0) [clippy::get_first]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/bundle.rs#112
intl/l10n/rust/fluent-ffi/src/bundle.rs:114:31: this expression creates a reference which is immediately dereferenced by the compiler [clippy::needless_borrow]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/bundle.rs#114
intl/l10n/rust/fluent-ffi/src/bundle.rs:267:29: this expression creates a reference which is immediately dereferenced by the compiler [clippy::needless_borrow]
https://searchfox.org/firefox-main/rev/cac2c0cf44beecb92c93119bd79e2408636f76d7/intl/l10n/rust/fluent-ffi/src/bundle.rs#267
To verify the fix:
./mach lint -W -l clippy intl/l10n/rust/fluent-ffi
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
•