Update dependencies (#48)
This commit is contained in:
parent
35907673aa
commit
c40eec8728
14
Cargo.toml
14
Cargo.toml
@ -51,21 +51,21 @@ harness = false
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "2.33.3", optional = true }
|
clap = { version = "2.33.3", optional = true }
|
||||||
num-rational = "0.3.2"
|
num-rational = "0.4"
|
||||||
num-bigint = "0.3.1"
|
num-bigint = "0.4"
|
||||||
num-traits = "0.2.14"
|
num-traits = "0.2.14"
|
||||||
once_cell = "1.5.2"
|
once_cell = "1.5.2"
|
||||||
rand = { version = "0.7.3", optional = true }
|
rand = { version = "0.8", optional = true }
|
||||||
codemap = "0.1.3"
|
codemap = "0.1.3"
|
||||||
peekmore = "0.5.6"
|
peekmore = "1.0"
|
||||||
wasm-bindgen = { version = "0.2.68", optional = true }
|
wasm-bindgen = { version = "0.2.68", optional = true }
|
||||||
beef = "0.4.4"
|
beef = "0.5"
|
||||||
phf = { version = "0.8.0", features = ["macros"] }
|
phf = { version = "0.9", features = ["macros"] }
|
||||||
# criterion is not a dev-dependency because it makes tests take too
|
# criterion is not a dev-dependency because it makes tests take too
|
||||||
# long to compile, and you cannot make dev-dependencies optional
|
# long to compile, and you cannot make dev-dependencies optional
|
||||||
criterion = { version = "0.3.3", optional = true }
|
criterion = { version = "0.3.3", optional = true }
|
||||||
indexmap = "1.6.0"
|
indexmap = "1.6.0"
|
||||||
lasso = "0.3.1"
|
lasso = "0.5"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["commandline", "random"]
|
default = ["commandline", "random"]
|
||||||
|
@ -130,7 +130,7 @@ pub(crate) fn random(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<
|
|||||||
Value::Null => {
|
Value::Null => {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
return Ok(Value::Dimension(
|
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,
|
Unit::None,
|
||||||
true,
|
true,
|
||||||
));
|
));
|
||||||
@ -173,7 +173,7 @@ pub(crate) fn random(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<
|
|||||||
|
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
Ok(Value::Dimension(
|
Ok(Value::Dimension(
|
||||||
Some(Number::from(rng.gen_range(0, limit) + 1)),
|
Some(Number::from(rng.gen_range(0..limit) + 1)),
|
||||||
Unit::None,
|
Unit::None,
|
||||||
true,
|
true,
|
||||||
))
|
))
|
||||||
|
@ -319,6 +319,7 @@ pub(crate) fn unique_id(args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value>
|
|||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
let string = std::iter::repeat(())
|
let string = std::iter::repeat(())
|
||||||
.map(|()| rng.sample(Alphanumeric))
|
.map(|()| rng.sample(Alphanumeric))
|
||||||
|
.map(char::from)
|
||||||
.take(7)
|
.take(7)
|
||||||
.collect();
|
.collect();
|
||||||
Ok(Value::String(string, QuoteKind::None))
|
Ok(Value::String(string, QuoteKind::None))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user