mod brush;
mod cache;
mod calculator;
mod extra;
mod layout;
mod section;
pub mod legacy;
pub use crate::glyph::{brush::*, calculator::*, extra::*, section::*};
pub use cache::Rectangle;
pub use layout::*;
use layout::ab_glyph::*;
#[cfg(not(target_arch = "wasm32"))]
pub type DefaultSectionHasher = twox_hash::RandomXxHashBuilder;
#[cfg(target_arch = "wasm32")]
pub type DefaultSectionHasher = std::hash::BuildHasherDefault<twox_hash::XxHash>;
#[test]
fn default_section_hasher() {
use std::hash::{BuildHasher, Hash, Hasher};
let section_a = Section::default().add_text(Text::new("Hovered Tile: Some((0, 0))"));
let section_b = Section::default().add_text(Text::new("Hovered Tile: Some((1, 0))"));
let hash = |s: &Section| {
let mut hasher = DefaultSectionHasher::default().build_hasher();
s.hash(&mut hasher);
hasher.finish()
};
assert_ne!(hash(§ion_a), hash(§ion_b));
}