diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-04-16 22:23:57 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-04-16 22:23:57 +0200 |
| commit | c5b3f8ee98203191d83d3cfca39bb0f35ee6efc2 (patch) | |
| tree | d41733b9f532a1b4ad0089761315ef69ba413e82 /tests/typeset.rs | |
| parent | 2db4b603db7684db7105d7ed627883b5cef6d497 (diff) | |
Switch to `unscanny`
Diffstat (limited to 'tests/typeset.rs')
| -rw-r--r-- | tests/typeset.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/typeset.rs b/tests/typeset.rs index bba82621..02d3ee38 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -6,6 +6,7 @@ use std::path::Path; use std::sync::Arc; use tiny_skia as sk; +use unscanny::Scanner; use walkdir::WalkDir; use typst::diag::Error; @@ -15,7 +16,6 @@ use typst::geom::{Length, RgbaColor}; use typst::library::layout::PageNode; use typst::library::text::{TextNode, TextSize}; use typst::loading::FsLoader; -use typst::parse::Scanner; use typst::source::SourceFile; use typst::syntax::Span; use typst::{bail, Context}; @@ -329,7 +329,7 @@ fn parse_metadata(source: &SourceFile) -> (Option<bool>, Vec<Error>) { }; fn num(s: &mut Scanner) -> usize { - s.eat_while(|c| c.is_numeric()).parse().unwrap() + s.eat_while(char::is_numeric).parse().unwrap() } let comments = @@ -348,7 +348,7 @@ fn parse_metadata(source: &SourceFile) -> (Option<bool>, Vec<Error>) { let end = if s.eat_if('-') { pos(&mut s) } else { start }; let span = Span::new(source.id(), start, end); - errors.push(Error::new(span, s.rest().trim())); + errors.push(Error::new(span, s.after().trim())); } (compare_ref, errors) |
