Update rustfmt to the 2024 style edition (#35764)

* Use 2024 style edition

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Reformat all code

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-03 12:26:53 +01:00 committed by GitHub
parent 6300e820b4
commit 3d320fa96a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
603 changed files with 1739 additions and 1648 deletions

View file

@ -5,7 +5,7 @@
//! The `Fragment` type, which represents the leaves of the layout tree.
use std::borrow::ToOwned;
use std::cmp::{max, min, Ordering};
use std::cmp::{Ordering, max, min};
use std::collections::LinkedList;
use std::sync::{Arc, Mutex};
use std::{f32, fmt};
@ -57,7 +57,7 @@ use webrender_api::units::LayoutTransform;
use webrender_api::{self, ImageKey};
use crate::context::LayoutContext;
use crate::display_list::items::{ClipScrollNodeIndex, OpaqueNode, BLUR_INFLATION_FACTOR};
use crate::display_list::items::{BLUR_INFLATION_FACTOR, ClipScrollNodeIndex, OpaqueNode};
use crate::display_list::{StackingContextId, ToLayout};
use crate::floats::ClearType;
use crate::flow::{GetBaseFlow, ImmutableFlowUtils};
@ -67,12 +67,12 @@ use crate::inline::{
LineMetrics,
};
use crate::model::{
self, style_length, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint,
self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, SizeConstraint, style_length,
};
use crate::text::TextRunScanner;
use crate::text_run::{TextRun, TextRunSlice};
use crate::wrapper::ThreadSafeLayoutNodeHelpers;
use crate::{text, ServoArc};
use crate::{ServoArc, text};
// From gfxFontConstants.h in Firefox.
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
@ -1649,7 +1649,7 @@ impl Fragment {
},
SpecificFragmentInfo::TruncatedFragment(_) => {
return IntrinsicISizesContribution::new()
return IntrinsicISizesContribution::new();
},
SpecificFragmentInfo::UnscannedText(..) => {