mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
wip: make EdnItem work on Arc<str>
This commit is contained in:
parent
d4f962fbfa
commit
1b9da07280
17 changed files with 152 additions and 260 deletions
|
|
@ -46,7 +46,7 @@ impl<E: Output, A: Content<E>> Content<E> for Align<E, A> {
|
|||
}
|
||||
}
|
||||
impl<'a, E: Output + 'a, T: EdnViewData<'a, E>> TryFromEdn<'a, T> for Align<E, RenderBox<'a, E>> {
|
||||
fn try_from_edn (state: &'a T, head: &EdnItem<&str>, tail: &'a [EdnItem<&str>]) -> Option<Self> {
|
||||
fn try_from_edn (state: &'a T, head: &EdnItem, tail: &'a [EdnItem]) -> Option<Self> {
|
||||
use EdnItem::*;
|
||||
Some(match (head, tail) {
|
||||
(Key("align/c"), [a]) => Self::c(state.get_content(a).expect("no content")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue