mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
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:
parent
6300e820b4
commit
3d320fa96a
603 changed files with 1739 additions and 1648 deletions
|
@ -8,7 +8,7 @@ use std::sync::{Arc, OnceLock};
|
|||
use app_units::Au;
|
||||
use core_foundation::base::TCFType;
|
||||
use core_foundation::string::CFString;
|
||||
use core_foundation::url::{kCFURLPOSIXPathStyle, CFURL};
|
||||
use core_foundation::url::{CFURL, kCFURLPOSIXPathStyle};
|
||||
use core_graphics::data_provider::CGDataProvider;
|
||||
use core_graphics::display::CFDictionary;
|
||||
use core_graphics::font::CGFont;
|
||||
|
@ -16,8 +16,8 @@ use core_text::font::CTFont;
|
|||
use core_text::font_descriptor::kCTFontURLAttribute;
|
||||
use parking_lot::RwLock;
|
||||
|
||||
use crate::system_font_service::FontIdentifier;
|
||||
use crate::FontData;
|
||||
use crate::system_font_service::FontIdentifier;
|
||||
|
||||
/// A cache of `CTFont` to avoid having to create `CTFont` instances over and over. It is
|
||||
/// always possible to create a `CTFont` using a `FontTemplate` even if it isn't in this
|
||||
|
|
|
@ -14,7 +14,7 @@ use core_foundation::string::UniChar;
|
|||
use core_graphics::font::CGGlyph;
|
||||
use core_text::font::CTFont;
|
||||
use core_text::font_descriptor::{
|
||||
kCTFontDefaultOrientation, CTFontTraits, SymbolicTraitAccessors, TraitAccessors,
|
||||
CTFontTraits, SymbolicTraitAccessors, TraitAccessors, kCTFontDefaultOrientation,
|
||||
};
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use log::debug;
|
||||
|
@ -24,9 +24,9 @@ use webrender_api::FontInstanceFlags;
|
|||
use super::core_text_font_cache::CoreTextFontCache;
|
||||
use super::font_list::LocalFontIdentifier;
|
||||
use crate::{
|
||||
map_platform_values_to_style_values, FontData, FontIdentifier, FontMetrics, FontTableMethods,
|
||||
FontTableTag, FontTemplateDescriptor, FractionalPixel, GlyphId, PlatformFontMethods, CBDT,
|
||||
COLR, KERN, SBIX,
|
||||
CBDT, COLR, FontData, FontIdentifier, FontMetrics, FontTableMethods, FontTableTag,
|
||||
FontTemplateDescriptor, FractionalPixel, GlyphId, KERN, PlatformFontMethods, SBIX,
|
||||
map_platform_values_to_style_values,
|
||||
};
|
||||
|
||||
const KERN_PAIR_LEN: usize = 6;
|
||||
|
@ -149,7 +149,7 @@ impl CachedKernTable {
|
|||
match key.cmp(&query) {
|
||||
Ordering::Less => start = i + 1,
|
||||
Ordering::Equal => {
|
||||
return Some(BigEndian::read_i16(&pairs[i * KERN_PAIR_LEN + 4..]))
|
||||
return Some(BigEndian::read_i16(&pairs[i * KERN_PAIR_LEN + 4..]));
|
||||
},
|
||||
Ordering::Greater => end = i,
|
||||
}
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
|
||||
use base::text::{unicode_plane, UnicodeBlock, UnicodeBlockMethod};
|
||||
use base::text::{UnicodeBlock, UnicodeBlockMethod, unicode_plane};
|
||||
use log::debug;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use memmap2::Mmap;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use style::values::computed::font::GenericFontFamily;
|
||||
use style::Atom;
|
||||
use style::values::computed::font::GenericFontFamily;
|
||||
use unicode_script::Script;
|
||||
use webrender_api::NativeFontHandle;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue