use Arc<str> where applicable; use konst split_at

This commit is contained in:
🪞👃🪞 2025-01-08 00:24:40 +01:00
parent 411fc0c4bc
commit 305481adee
35 changed files with 286 additions and 273 deletions

View file

@ -57,7 +57,7 @@ impl<E: Output> Measure<E> {
pub fn set_w (&self, w: impl Into<usize>) { self.x.store(w.into(), Relaxed) }
pub fn set_h (&self, h: impl Into<usize>) { self.y.store(h.into(), Relaxed) }
pub fn set_wh (&self, w: impl Into<usize>, h: impl Into<usize>) { self.set_w(w); self.set_h(h); }
pub fn format (&self) -> String { format!("{}x{}", self.w(), self.h()) }
pub fn format (&self) -> Arc<str> { format!("{}x{}", self.w(), self.h()).into() }
pub fn new () -> Self {
Self {
_engine: PhantomData::default(),