Update edition to 2024

This commit is contained in:
Héctor Ramón Jiménez 2025-03-09 01:01:09 +01:00
parent 007fc4b0d5
commit a886f2427e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 10 additions and 10 deletions

View file

@ -2,7 +2,7 @@
name = "cryoglyph"
description = "Fast, simple 2D text rendering for wgpu"
version = "0.1.0"
edition = "2021"
edition = "2024"
repository = "https://github.com/iced-rs/cryoglyph"
license = "MIT OR Apache-2.0 OR Zlib"

View file

@ -1,5 +1,5 @@
use cosmic_text::{Attrs, Buffer, Color, Family, FontSystem, Metrics, Shaping, SwashCache};
use criterion::{criterion_group, criterion_main, Criterion};
use criterion::{Criterion, criterion_group, criterion_main};
use cryoglyph::{
Cache, ColorMode, Resolution, TextArea, TextAtlas, TextBounds, TextRenderer, Viewport, Weight,
};

View file

@ -21,11 +21,11 @@ use text_render::ContentType;
// Re-export all top-level types from `cosmic-text` for convenience.
#[doc(no_inline)]
pub use cosmic_text::{
self, fontdb, Action, Affinity, Attrs, AttrsList, AttrsOwned, Buffer, BufferLine, CacheKey,
Color, Command, Cursor, Edit, Editor, Family, FamilyOwned, Font, FontSystem, LayoutCursor,
self, Action, Affinity, Attrs, AttrsList, AttrsOwned, Buffer, BufferLine, CacheKey, Color,
Command, Cursor, Edit, Editor, Family, FamilyOwned, Font, FontSystem, LayoutCursor,
LayoutGlyph, LayoutLine, LayoutRun, LayoutRunIter, Metrics, ShapeGlyph, ShapeLine, ShapeSpan,
ShapeWord, Shaping, Stretch, Style, SubpixelBin, SwashCache, SwashContent, SwashImage, Weight,
Wrap,
Wrap, fontdb,
};
use etagere::AllocId;

View file

@ -1,7 +1,7 @@
use crate::{
text_render::ContentType, Cache, CacheKey, FontSystem, GlyphDetails, GpuCacheStatus, SwashCache,
Cache, CacheKey, FontSystem, GlyphDetails, GpuCacheStatus, SwashCache, text_render::ContentType,
};
use etagere::{size2, Allocation, BucketedAtlasAllocator};
use etagere::{Allocation, BucketedAtlasAllocator, size2};
use lru::LruCache;
use rustc_hash::FxHasher;
use std::{collections::HashSet, hash::BuildHasherDefault};

View file

@ -5,9 +5,9 @@ use crate::{
use std::{num::NonZeroU64, slice};
use wgpu::util::StagingBelt;
use wgpu::{
Buffer, BufferDescriptor, BufferUsages, CommandEncoder, DepthStencilState, Device, Extent3d,
MultisampleState, Origin3d, Queue, RenderPass, RenderPipeline, TexelCopyBufferLayout,
TexelCopyTextureInfo, TextureAspect, COPY_BUFFER_ALIGNMENT,
Buffer, BufferDescriptor, BufferUsages, COPY_BUFFER_ALIGNMENT, CommandEncoder,
DepthStencilState, Device, Extent3d, MultisampleState, Origin3d, Queue, RenderPass,
RenderPipeline, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect,
};
/// A text renderer that uses cached glyphs to render text into an existing render pass.