Update dependencies (#48)

This commit is contained in:
Paolo Barbolini 2021-07-11 07:35:56 +02:00 committed by GitHub
parent 35907673aa
commit c40eec8728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -51,21 +51,21 @@ harness = false
[dependencies]
clap = { version = "2.33.3", optional = true }
num-rational = "0.3.2"
num-bigint = "0.3.1"
num-rational = "0.4"
num-bigint = "0.4"
num-traits = "0.2.14"
once_cell = "1.5.2"
rand = { version = "0.7.3", optional = true }
rand = { version = "0.8", optional = true }
codemap = "0.1.3"
peekmore = "0.5.6"
peekmore = "1.0"
wasm-bindgen = { version = "0.2.68", optional = true }
beef = "0.4.4"
phf = { version = "0.8.0", features = ["macros"] }
beef = "0.5"
phf = { version = "0.9", features = ["macros"] }
# criterion is not a dev-dependency because it makes tests take too
# long to compile, and you cannot make dev-dependencies optional
criterion = { version = "0.3.3", optional = true }
indexmap = "1.6.0"
lasso = "0.3.1"
lasso = "0.5"
[features]
default = ["commandline", "random"]

View File

@ -130,7 +130,7 @@ pub(crate) fn random(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<
Value::Null => {
let mut rng = rand::thread_rng();
return Ok(Value::Dimension(
Some(Number::from(rng.gen_range(0.0, 1.0))),
Some(Number::from(rng.gen_range(0.0..1.0))),
Unit::None,
true,
));
@ -173,7 +173,7 @@ pub(crate) fn random(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<
let mut rng = rand::thread_rng();
Ok(Value::Dimension(
Some(Number::from(rng.gen_range(0, limit) + 1)),
Some(Number::from(rng.gen_range(0..limit) + 1)),
Unit::None,
true,
))

View File

@ -319,6 +319,7 @@ pub(crate) fn unique_id(args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value>
let mut rng = thread_rng();
let string = std::iter::repeat(())
.map(|()| rng.sample(Alphanumeric))
.map(char::from)
.take(7)
.collect();
Ok(Value::String(string, QuoteKind::None))