upgrade dependencies

This commit is contained in:
ConnorSkees 2020-06-19 22:47:06 -04:00
parent 1a5301d0fa
commit 47c4a421ac
10 changed files with 38 additions and 38 deletions

View File

@ -20,7 +20,7 @@ required-features = ["commandline"]
[lib]
name = "grass"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
# crate-type = ["cdylib", "rlib"]
bench = false
[[bench]]
@ -45,15 +45,15 @@ harness = false
[dependencies]
clap = { version = "2.33.0", optional = true }
num-rational = "0.2.3"
num-bigint = "0.2.6"
num-traits = "0.2.11"
once_cell = "1.3.1"
clap = { version = "2.33.1", optional = true }
num-rational = "0.3.0"
num-bigint = "0.3.0"
num-traits = "0.2.12"
once_cell = "1.4.0"
rand = { version = "0.7.3", optional = true }
codemap = "0.1.3"
peekmore = "0.4.0"
wasm-bindgen = { version = "0.2.60", optional = true }
peekmore = "0.5.1"
wasm-bindgen = { version = "0.2.63", optional = true }
beef = "0.4.4"
# criterion is not a dev-dependency because it makes tests take too
# long to compile, and you cannot make dev-dependencies optional
@ -76,8 +76,8 @@ profiling = []
bench = ["criterion"]
[dev-dependencies]
tempfile = "3"
paste = "0.1"
tempfile = "3.1.0"
paste = "0.1.17"
[profile.release]
debug = true

View File

@ -66,7 +66,7 @@ impl<'a> Parser<'a> {
let interpolation = self.parse_interpolation()?;
buf.push_str(&interpolation.node.to_css_string(interpolation.span)?);
} else {
self.toks.reset_view();
self.toks.reset_cursor();
break;
}
}

View File

@ -479,7 +479,7 @@ impl<'a> Parser<'a> {
self.read_until_newline();
}
_ => {
self.toks.reset_view();
self.toks.reset_cursor();
return found_whitespace;
}
},
@ -520,7 +520,7 @@ impl<'a> Parser<'a> {
self.toks.peek_forward(1);
let ident = peek_ident_no_interpolation(self.toks, false, pos)?;
if ident.as_str() != "else" {
self.toks.reset_view();
self.toks.reset_cursor();
break;
}
self.toks.take(4).for_each(drop);

View File

@ -49,11 +49,11 @@ impl<'a> Parser<'a> {
while let Some(tok) = self.toks.peek() {
match tok.kind {
';' | '}' => {
self.toks.reset_view();
self.toks.reset_cursor();
break;
}
'{' => {
self.toks.reset_view();
self.toks.reset_cursor();
return None;
}
'(' => {
@ -98,10 +98,10 @@ impl<'a> Parser<'a> {
if let Some(first_char) = self.toks.peek() {
if first_char.kind == '#' {
if !matches!(self.toks.peek_forward(1), Some(Token { kind: '{', .. })) {
self.toks.reset_view();
self.toks.reset_cursor();
return Ok(SelectorOrStyle::Selector(String::new()));
}
self.toks.reset_view();
self.toks.reset_cursor();
} else if !is_name_start(first_char.kind) && first_char.kind != '-' {
return Ok(SelectorOrStyle::Selector(String::new()));
}

View File

@ -382,10 +382,10 @@ impl<'a> Parser<'a> {
'#' => {
if let Some(Token { kind: '{', pos }) = self.toks.peek_forward(1) {
self.span_before = *pos;
self.toks.reset_view();
self.toks.reset_cursor();
return Some(self.parse_ident_value());
}
self.toks.reset_view();
self.toks.reset_cursor();
self.toks.next();
let hex = match self.parse_hex() {
Ok(v) => v,
@ -660,7 +660,7 @@ impl<'a> Parser<'a> {
peek_counter += peek_whitespace(self.toks);
while let Some(tok) = self.toks.peek() {
let kind = tok.kind;
self.toks.move_forward(1);
self.toks.advance_cursor();
peek_counter += 1;
if kind == '!'
|| kind == '%'
@ -673,7 +673,7 @@ impl<'a> Parser<'a> {
buf.push_str(&self.peek_escape()?);
} else if kind == '#' {
if let Some(Token { kind: '{', .. }) = self.toks.peek() {
self.toks.move_forward(1);
self.toks.advance_cursor();
peek_counter += 1;
let (interpolation, count) = self.peek_interpolation()?;
peek_counter += count;
@ -705,14 +705,14 @@ impl<'a> Parser<'a> {
break;
}
}
self.toks.reset_view();
self.toks.reset_cursor();
Ok(None)
}
fn peek_interpolation(&mut self) -> SassResult<(Spanned<Value>, usize)> {
let vec = peek_until_closing_curly_brace(self.toks)?;
let peek_counter = vec.len();
self.toks.move_forward(1);
self.toks.advance_cursor();
let val = self.parse_value_from_vec(vec)?;
Ok((
Spanned {

View File

@ -171,7 +171,7 @@ impl<'a> Parser<'a> {
default = true;
}
"important" => {
self.toks.reset_view();
self.toks.reset_cursor();
val_toks.push(self.toks.next().unwrap());
continue;
}

View File

@ -46,14 +46,14 @@ fn attribute_name(parser: &mut Parser<'_>, start: Span) -> SassResult<QualifiedN
}
match parser.toks.peek_forward(1) {
Some(v) if v.kind == '=' => {
parser.toks.reset_view();
parser.toks.reset_cursor();
return Ok(QualifiedName {
ident: name_or_namespace.node,
namespace: Namespace::None,
});
}
Some(..) => {
parser.toks.reset_view();
parser.toks.reset_cursor();
}
None => return Err(("expected more input.", name_or_namespace.span).into()),
}

View File

@ -222,11 +222,11 @@ impl<'a, 'b> SelectorParser<'a, 'b> {
match self.parser.toks.peek_forward(1) {
Some(Token { kind, .. }) if is_name_start(*kind) || kind == &'-' || kind == &'\\' => {
self.parser.toks.reset_view();
self.parser.toks.reset_cursor();
true
}
Some(..) | None => {
self.parser.toks.reset_view();
self.parser.toks.reset_cursor();
false
}
}

View File

@ -106,7 +106,7 @@ pub(crate) fn eat_number<I: Iterator<Item = Token>>(
break;
}
toks.reset_view();
toks.reset_cursor();
whole.push_str(&dec);

View File

@ -15,13 +15,13 @@ pub(crate) fn peek_until_closing_curly_brace<I: Iterator<Item = Token>>(
match tok.kind {
q @ '"' | q @ '\'' => {
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
t.extend(peek_until_closing_quote(toks, q)?);
}
'{' => {
nesting += 1;
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
}
'}' => {
if nesting == 0 {
@ -29,7 +29,7 @@ pub(crate) fn peek_until_closing_curly_brace<I: Iterator<Item = Token>>(
} else {
nesting -= 1;
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
}
}
'/' => {
@ -44,7 +44,7 @@ pub(crate) fn peek_until_closing_curly_brace<I: Iterator<Item = Token>>(
}
_ => {
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
}
}
}
@ -61,12 +61,12 @@ fn peek_until_closing_quote<I: Iterator<Item = Token>>(
match tok.kind {
'"' if q == '"' => {
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
break;
}
'\'' if q == '\'' => {
t.push(tok);
toks.move_forward(1);
toks.advance_cursor();
break;
}
'\\' => {
@ -90,7 +90,7 @@ fn peek_until_closing_quote<I: Iterator<Item = Token>>(
}
_ => t.push(tok),
}
toks.move_forward(1);
toks.advance_cursor();
}
Ok(t)
}
@ -100,7 +100,7 @@ fn peek_until_newline<I: Iterator<Item = Token>>(toks: &mut PeekMoreIterator<I>)
if tok.kind == '\n' {
break;
}
toks.move_forward(1);
toks.advance_cursor();
}
}
@ -111,7 +111,7 @@ fn peek_whitespace<I: Iterator<Item = W>, W: IsWhitespace>(s: &mut PeekMoreItera
break;
}
found_whitespace = true;
s.move_forward(1);
s.advance_cursor();
}
found_whitespace
}