mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: fix several lint warns (#32126)
As seems #31500 still remain opened here's the next partial fix. Fixed list: `unused_mut`, `clippy::needless_borrow`, `clippy::match_ref_pats`, `clippy::borrow_deref_ref`, `clippy::ptr_eq`, `clippy::unnecessary_cast`, `clippy::derivable_impls`, `clippy::collapsible_match`, `clippy::extra_unused_lifetimes`, `clippy::map_clone`, `clippy::manual_filter`. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes are part of #31500. - [x] These changes do not require tests because are only cosmetic.
This commit is contained in:
parent
025a987732
commit
67f239d1ba
17 changed files with 54 additions and 83 deletions
|
@ -86,7 +86,7 @@ const DEFAULT_SUBMIT_VALUE: &str = "Submit";
|
|||
const DEFAULT_RESET_VALUE: &str = "Reset";
|
||||
const PASSWORD_REPLACEMENT_CHAR: char = '●';
|
||||
|
||||
#[derive(Clone, Copy, JSTraceable, PartialEq)]
|
||||
#[derive(Clone, Copy, Default, JSTraceable, PartialEq)]
|
||||
#[allow(dead_code)]
|
||||
#[derive(MallocSizeOf)]
|
||||
pub enum InputType {
|
||||
|
@ -108,6 +108,7 @@ pub enum InputType {
|
|||
Search,
|
||||
Submit,
|
||||
Tel,
|
||||
#[default]
|
||||
Text,
|
||||
Time,
|
||||
Url,
|
||||
|
@ -224,12 +225,6 @@ impl<'a> From<&'a Atom> for InputType {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for InputType {
|
||||
fn default() -> InputType {
|
||||
InputType::Text
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
enum ValueMode {
|
||||
Value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue