mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
clippy: Fix unnecessary_cast
warnings in components/script
(#31823)
* clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
This commit is contained in:
parent
3e9b808938
commit
bae77671f8
21 changed files with 32 additions and 45 deletions
|
@ -776,7 +776,7 @@ fn max_day_in_month(year_num: i32, month_num: u32) -> Option<u32> {
|
|||
|
||||
/// <https://html.spec.whatwg.org/multipage/#week-number-of-the-last-day>
|
||||
fn max_week_in_year(year: i32) -> u32 {
|
||||
Utc.with_ymd_and_hms(year as i32, 1, 1, 0, 0, 0)
|
||||
Utc.with_ymd_and_hms(year, 1, 1, 0, 0, 0)
|
||||
.earliest()
|
||||
.map(|date_time| match date_time.weekday() {
|
||||
Weekday::Thu => 53,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue