wip: make EdnItem work on Arc<str>

This commit is contained in:
🪞👃🪞 2025-01-17 18:49:04 +01:00
parent d4f962fbfa
commit 1b9da07280
17 changed files with 152 additions and 260 deletions

View file

@ -92,7 +92,7 @@ impl<E: Output, A: Content<E>, B: Content<E>> BspAreas<E, A, B> for Bsp<E, A, B>
fn contents (&self) -> (&A, &B) { (&self.2, &self.3) }
}
impl<'a, E: Output + 'a, T: EdnViewData<'a, E>> TryFromEdn<'a, T> for Bsp<E, RenderBox<'a, E>, RenderBox<'a, E>> {
fn try_from_edn (s: &'a T, head: &EdnItem<&str>, tail: &'a [EdnItem<&str>]) -> Option<Self> {
fn try_from_edn (s: &'a T, head: &EdnItem, tail: &'a [EdnItem]) -> Option<Self> {
use EdnItem::*;
Some(match (head, tail) {
(Key("bsp/n"), [a, b]) => Self::n(