servo/components/script/dom/bindings
Pi-Cla 160c7c0b0f
Fix some clippy warnings in components/gfx and components/script (#32215)
* clippy: Squish warnings and errors in gfx

warning: redundant closure (gfx/font.rs:415:18)

warning: useless conversion to the same type (gfx/font.rs:534:9)

warning: the following explicit lifetimes could be elided: 'a (gfx/font.rs:619:16)

error: this loop never actually loops (gfx/font_cache_thread.rs:112:9)

warning: this expression creates a reference which is immediately dereferenced by the compiler  (gfx/font_cache_thread.rs:229:51)

warning: redundant closure (gfx/font_cache_thread.rs:551:18)

3 instances of:
warning: casting integer literal to `f64` is unnecessary (gfx/platform/freetype/font_list.rs:271-273)

* clippy: methods called `from_*` usually take no `self`

It reports that by standard convention, from_* methods should not take any `&self` parameter

* clippy: you should consider adding a `Default` implementation

It reports that public types with a pub fn new() -> Self should have a Default implementation since they can be constructed without arguments

* clippy: casting to the same type is unnecessary (`f32` -> `f32`)

* clippy: use of `unwrap_or_else` to construct default value

* clippy: methods called `is_*` usually take `self` by mutable reference or `self` by reference or no `self`

* clippy: manual `!RangeInclusive::contains` implementation

contains expresses the intent better and has less failure modes (such as fencepost errors or using || instead of &&)

* clippy: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`

* clippy: Fix some new warnings

warning: this `if` statement can be collapsed (gfx/font.rs:468:130)

warning: this lifetime isn't used in the impl (gfx/platform/freetype/font.rs:341:6)

warning: field assignment outside of initializer for an instance created with Default::default() (compositor.rs:881:17)
2024-05-02 20:02:21 +00:00
..
codegen clippy: Fix remaining warnings in generated code (#31844) 2024-03-25 11:12:36 +00:00
buffer_source.rs clippy: Fix several warnings in components/script/dom/bindings (#31945) 2024-04-03 17:19:53 +00:00
callback.rs clippy: Fix a few clippy problems in components/scripts/dom (#31905) 2024-03-28 11:24:39 +00:00
cell.rs clippy: Fix all errors in components/script (#31911) 2024-03-28 09:03:18 +00:00
constant.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
conversions.rs clippy:Fix clippy problems in components/scripts/binding (#31893) 2024-03-27 12:32:04 +00:00
error.rs clippy: fix some warnings in components/script (#31865) 2024-03-26 10:31:22 +00:00
finalize.rs Extract generated finalizers into generic helper functions. (#31569) 2024-03-08 14:15:26 +00:00
guard.rs clippy: Fix several warnings (#31710) 2024-03-18 08:33:43 +00:00
htmlconstructor.rs clippy: Fix explicit_auto_deref warnings in components/script (#31837) 2024-03-23 11:29:20 +00:00
import.rs Address issues uncovered by rust-1.78 beta (#32130) 2024-04-22 18:20:47 +00:00
inheritance.rs Fix crash when closing window containing video element (#31413) 2024-02-23 12:18:49 +00:00
interface.rs clippy: Fix several warnings in components/script/dom/bindings (#31945) 2024-04-03 17:19:53 +00:00
iterable.rs clippy: Fix several warnings (#31710) 2024-03-18 08:33:43 +00:00
like.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
mod.rs clippy: Fix remaining warnings in generated code (#31844) 2024-03-25 11:12:36 +00:00
namespace.rs clippy: Allow too_many_arguments for all functions (#31962) 2024-04-01 14:53:33 +00:00
num.rs clippy: Fix dereferencing a tuple pattern warnings (#31811) 2024-03-21 17:04:18 +00:00
principals.rs Strict import formatting (grouping and granularity) (#30325) 2023-09-11 19:16:54 +00:00
proxyhandler.rs clippy: Fix several warnings in components/script/dom/bindings (#31945) 2024-04-03 17:19:53 +00:00
record.rs Fix some clippy warnings in components/gfx and components/script (#32215) 2024-05-02 20:02:21 +00:00
refcounted.rs clippy: Fix clippy problems in components/script/dom (#31891) 2024-03-27 18:36:16 +00:00
reflector.rs Fix rustdoc errors in components/script/dom (#31617) 2024-03-11 22:04:05 +00:00
root.rs Address issues uncovered by rust-1.78 beta (#32130) 2024-04-22 18:20:47 +00:00
serializable.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
settings_stack.rs Replace script_plugins with a clippy like rustc driver (named crown) (#30508) 2023-12-01 15:50:52 +00:00
str.rs clippy: Fix from_over_into warnings (#31946) 2024-03-30 11:30:14 +00:00
structuredclone.rs clippy: Fix a variety of warnings in components/script/dom (#31894) 2024-03-29 14:43:10 +00:00
trace.rs clippy: Fix option_map_unit_fn warnings (#31906) 2024-03-27 18:43:56 +00:00
transferable.rs rustdoc: Fix many rustdoc errors (#31147) 2024-01-22 13:13:48 +00:00
utils.rs fixed various clippy warnings (#31954) 2024-03-31 19:58:37 +00:00
weakref.rs Replace script_plugins with a clippy like rustc driver (named crown) (#30508) 2023-12-01 15:50:52 +00:00
xmlname.rs clippy: Fix match_like_matches warnings (#31947) 2024-03-30 10:06:26 +00:00