Skip to content

Commit

Permalink
typst_vello: Use ahash directly, remove bevy_utils
Browse files Browse the repository at this point in the history
In `bevy_utils`, the `HashMap` is using `hashbrown` and `ahash`.
Since Rust uses `hashbrown` since Rust 1.35, the main (only?)
difference is in the use of `ahash`, since this crate isn't
looking to target `no_std` currently.
  • Loading branch information
waywardmonkeys committed Sep 16, 2024
1 parent d0760fd commit 6b7926a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/typst_vello/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ readme.workspace = true
typst = { workspace = true }
vello = { workspace = true }
vello_svg = { workspace = true }
bevy_utils = "0.14.1"
ahash = "0.8.11"
ttf-parser = "0.24.1"

[lints]
Expand Down
4 changes: 2 additions & 2 deletions crates/typst_vello/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub use typst;

use bevy_utils::HashMap;
use ahash::AHashMap;
use image::{render_image, ImageScene};
use shape::{convert_path, render_shape, ShapeScene};
use text::{render_text, TextScene};
Expand All @@ -26,7 +26,7 @@ pub mod utils;
pub struct TypstScene {
size: kurbo::Vec2,
group_scenes: Vec<TypstGroupScene>,
group_map: HashMap<Label, Vec<usize>>,
group_map: AHashMap<Label, Vec<usize>>,
}

impl TypstScene {
Expand Down

0 comments on commit 6b7926a

Please sign in to comment.