diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-15 12:00:13 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-15 12:40:27 +0100 |
| commit | 40561e57fbbc68becac07acd54a34f94f591f277 (patch) | |
| tree | 9e3401f987f1b19ef30162ac00395b7bbba871c6 /library | |
| parent | 15f0434d1fdd03bc84cacaf6a39ac294a0c75789 (diff) | |
Remove most fields from `SyntaxKind` enum
Diffstat (limited to 'library')
| -rw-r--r-- | library/src/lib.rs | 2 | ||||
| -rw-r--r-- | library/src/math/mod.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs index 14b02033..24f3560f 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -208,6 +208,6 @@ fn items() -> LangItems { math_atom: |atom| math::AtomNode(atom).pack(), math_script: |base, sub, sup| math::ScriptNode { base, sub, sup }.pack(), math_frac: |num, denom| math::FracNode { num, denom }.pack(), - math_align_point: |count| math::AlignPointNode(count).pack(), + math_align_point: || math::AlignPointNode.pack(), } } diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 62afe573..52cddc9f 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -637,12 +637,12 @@ impl Texify for ScriptNode { #[func] #[capable(Texify)] #[derive(Debug, Hash)] -pub struct AlignPointNode(pub NonZeroUsize); +pub struct AlignPointNode; #[node] impl AlignPointNode { - fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> { - Ok(Self(args.expect("index")?).pack()) + fn construct(_: &Vm, _: &mut Args) -> SourceResult<Content> { + Ok(Self.pack()) } } |
