mirror of
https://github.com/elkowar/eww.git
synced 2024-10-05 15:40:12 +03:00
Yeet use of patterns feature
This commit is contained in:
parent
031a2b52ec
commit
e93f345210
@ -1,4 +1,3 @@
|
||||
#![feature(pattern)]
|
||||
#![feature(try_blocks)]
|
||||
#![feature(unwrap_infallible)]
|
||||
#![feature(never_type)]
|
||||
|
@ -1,5 +1,3 @@
|
||||
use std::str::pattern::Pattern;
|
||||
|
||||
use eww_shared_util::{Span, Spanned};
|
||||
use once_cell::sync::Lazy;
|
||||
use regex::{Regex, RegexSet};
|
||||
@ -133,10 +131,6 @@ impl<'s> Lexer<'s> {
|
||||
&self.source[self.pos..]
|
||||
}
|
||||
|
||||
pub fn continues_with(&self, pat: impl Pattern<'s>) -> bool {
|
||||
self.remaining().starts_with(pat)
|
||||
}
|
||||
|
||||
pub fn next_token(&mut self) -> Option<Result<Sp<Token>, LexicalError>> {
|
||||
loop {
|
||||
if self.failed || self.pos >= self.source.len() {
|
||||
|
Loading…
Reference in New Issue
Block a user