chore: Bump Rust edition to 2024 (#27800)

Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-03-31 20:55:27 +02:00 committed by GitHub
parent d50905e000
commit dc64ec9cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
802 changed files with 3775 additions and 3662 deletions

View file

@ -1,8 +1,8 @@
use crate::{
point, px, size, swap_rgba_pa_to_bgra, Bounds, DevicePixels, Font, FontFallbacks, FontFeatures,
FontId, FontMetrics, FontRun, FontStyle, FontWeight, GlyphId, LineLayout, Pixels,
PlatformTextSystem, Point, RenderGlyphParams, Result, ShapedGlyph, ShapedRun, SharedString,
Size, SUBPIXEL_VARIANTS,
Bounds, DevicePixels, Font, FontFallbacks, FontFeatures, FontId, FontMetrics, FontRun,
FontStyle, FontWeight, GlyphId, LineLayout, Pixels, PlatformTextSystem, Point,
RenderGlyphParams, Result, SUBPIXEL_VARIANTS, ShapedGlyph, ShapedRun, SharedString, Size,
point, px, size, swap_rgba_pa_to_bgra,
};
use anyhow::anyhow;
use cocoa::appkit::CGFloat;
@ -14,7 +14,7 @@ use core_foundation::{
string::CFString,
};
use core_graphics::{
base::{kCGImageAlphaPremultipliedLast, CGGlyph},
base::{CGGlyph, kCGImageAlphaPremultipliedLast},
color_space::CGColorSpace,
context::CGContext,
display::CGPoint,
@ -639,7 +639,7 @@ mod lenient_font_attributes {
string::{CFString, CFStringRef},
};
use core_text::font_descriptor::{
kCTFontFamilyNameAttribute, CTFontDescriptor, CTFontDescriptorCopyAttribute,
CTFontDescriptor, CTFontDescriptorCopyAttribute, kCTFontFamilyNameAttribute,
};
pub fn family_name(descriptor: &CTFontDescriptor) -> Option<String> {
@ -674,7 +674,7 @@ mod lenient_font_attributes {
#[cfg(test)]
mod tests {
use crate::{font, px, FontRun, GlyphId, MacTextSystem, PlatformTextSystem};
use crate::{FontRun, GlyphId, MacTextSystem, PlatformTextSystem, font, px};
#[test]
fn test_layout_line_bom_char() {
@ -697,7 +697,7 @@ mod tests {
assert_eq!(layout.runs.len(), 1);
assert_eq!(layout.runs[0].glyphs.len(), 2);
assert_eq!(layout.runs[0].glyphs[0].id, GlyphId(68u32)); // a
// There's no glyph for \u{feff}
// There's no glyph for \u{feff}
assert_eq!(layout.runs[0].glyphs[1].id, GlyphId(69u32)); // b
}
}