remove allow
s from modules
This commit is contained in:
parent
d029fd2001
commit
de9571b3fe
@ -1,17 +1,11 @@
|
||||
use crate::{
|
||||
args::CallArgs,
|
||||
builtin::{
|
||||
color::{
|
||||
hsl::{complement, grayscale, hue, invert, lightness, saturation},
|
||||
opacity::alpha,
|
||||
other::{adjust_color, change_color, ie_hex_str, scale_color},
|
||||
rgb::{blue, green, mix, red},
|
||||
},
|
||||
modules::Module,
|
||||
use crate::builtin::{
|
||||
color::{
|
||||
hsl::{complement, grayscale, hue, invert, lightness, saturation},
|
||||
opacity::alpha,
|
||||
other::{adjust_color, change_color, ie_hex_str, scale_color},
|
||||
rgb::{blue, green, mix, red},
|
||||
},
|
||||
error::SassResult,
|
||||
parse::Parser,
|
||||
value::Value,
|
||||
modules::Module,
|
||||
};
|
||||
|
||||
pub(crate) fn declare(f: &mut Module) {
|
||||
|
@ -1,12 +1,6 @@
|
||||
use crate::{
|
||||
args::CallArgs,
|
||||
builtin::{
|
||||
list::{append, index, is_bracketed, join, length, list_separator, nth, set_nth, zip},
|
||||
modules::Module,
|
||||
},
|
||||
error::SassResult,
|
||||
parse::Parser,
|
||||
value::Value,
|
||||
use crate::builtin::{
|
||||
list::{append, index, is_bracketed, join, length, list_separator, nth, set_nth, zip},
|
||||
modules::Module,
|
||||
};
|
||||
|
||||
pub(crate) fn declare(f: &mut Module) {
|
||||
|
@ -1,12 +1,6 @@
|
||||
use crate::{
|
||||
args::CallArgs,
|
||||
builtin::{
|
||||
map::{map_get, map_has_key, map_keys, map_merge, map_remove, map_values},
|
||||
modules::Module,
|
||||
},
|
||||
error::SassResult,
|
||||
parse::Parser,
|
||||
value::Value,
|
||||
use crate::builtin::{
|
||||
map::{map_get, map_has_key, map_keys, map_merge, map_remove, map_values},
|
||||
modules::Module,
|
||||
};
|
||||
|
||||
pub(crate) fn declare(f: &mut Module) {
|
||||
|
@ -19,7 +19,7 @@ use crate::{
|
||||
#[cfg(feature = "random")]
|
||||
use crate::builtin::math::random;
|
||||
|
||||
fn clamp(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn clamp(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(3)?;
|
||||
let span = args.span();
|
||||
|
||||
@ -101,7 +101,7 @@ fn clamp(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
Ok(number)
|
||||
}
|
||||
|
||||
fn hypot(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn hypot(args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.min_args(1)?;
|
||||
|
||||
let span = args.span();
|
||||
@ -172,7 +172,7 @@ fn hypot(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
Ok(Value::Dimension(sum.sqrt(), first.1, true))
|
||||
}
|
||||
|
||||
fn log(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn log(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(2)?;
|
||||
|
||||
let number = match args.get_err(0, "number")? {
|
||||
@ -239,7 +239,7 @@ fn log(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
))
|
||||
}
|
||||
|
||||
fn pow(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn pow(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(2)?;
|
||||
|
||||
let base = match args.get_err(0, "base")? {
|
||||
@ -289,7 +289,7 @@ fn pow(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
Ok(Value::Dimension(base.pow(exponent), Unit::None, true))
|
||||
}
|
||||
|
||||
fn sqrt(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn sqrt(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(1)?;
|
||||
let number = args.get_err(0, "number")?;
|
||||
|
||||
@ -318,7 +318,7 @@ fn sqrt(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
|
||||
macro_rules! trig_fn {
|
||||
($name:ident, $name_deg:ident) => {
|
||||
fn $name(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn $name(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(1)?;
|
||||
let number = args.get_err(0, "number")?;
|
||||
|
||||
@ -357,7 +357,7 @@ trig_fn!(cos, cos_deg);
|
||||
trig_fn!(sin, sin_deg);
|
||||
trig_fn!(tan, tan_deg);
|
||||
|
||||
fn acos(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn acos(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(1)?;
|
||||
let number = args.get_err(0, "number")?;
|
||||
|
||||
@ -394,7 +394,7 @@ fn acos(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
})
|
||||
}
|
||||
|
||||
fn asin(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn asin(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(1)?;
|
||||
let number = args.get_err(0, "number")?;
|
||||
|
||||
@ -429,7 +429,7 @@ fn asin(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
})
|
||||
}
|
||||
|
||||
fn atan(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn atan(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(1)?;
|
||||
let number = args.get_err(0, "number")?;
|
||||
|
||||
@ -462,7 +462,7 @@ fn atan(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
})
|
||||
}
|
||||
|
||||
fn atan2(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Value> {
|
||||
fn atan2(mut args: CallArgs, _: &mut Parser<'_>) -> SassResult<Value> {
|
||||
args.max_args(2)?;
|
||||
let (y_num, y_unit) = match args.get_err(0, "y")? {
|
||||
Value::Dimension(n, u, ..) => (n, u),
|
||||
|
@ -39,7 +39,7 @@ fn load_css(mut args: CallArgs, parser: &mut Parser<'_>) -> SassResult<Vec<Stmt>
|
||||
}
|
||||
};
|
||||
|
||||
if let Some(with) = with {
|
||||
if let Some(..) = with {
|
||||
todo!("`$with` to `load-css` not yet implemented")
|
||||
} else {
|
||||
parser.parse_single_import(&url, args.span())
|
||||
|
@ -1,5 +1,3 @@
|
||||
#![allow(unused_imports, unused_variables, dead_code, unused_mut)]
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use codemap::{Span, Spanned};
|
||||
|
@ -1,13 +1,9 @@
|
||||
use crate::{
|
||||
args::CallArgs,
|
||||
builtin::modules::Module,
|
||||
builtin::selector::{
|
||||
is_superselector, selector_append, selector_extend, selector_nest, selector_parse,
|
||||
selector_replace, selector_unify, simple_selectors,
|
||||
},
|
||||
error::SassResult,
|
||||
parse::Parser,
|
||||
value::Value,
|
||||
};
|
||||
|
||||
pub(crate) fn declare(f: &mut Module) {
|
||||
|
@ -1,15 +1,8 @@
|
||||
use crate::{
|
||||
args::CallArgs,
|
||||
builtin::{
|
||||
modules::Module,
|
||||
string::{
|
||||
quote, str_index, str_insert, str_length, str_slice, to_lower_case, to_upper_case,
|
||||
unquote,
|
||||
},
|
||||
use crate::builtin::{
|
||||
modules::Module,
|
||||
string::{
|
||||
quote, str_index, str_insert, str_length, str_slice, to_lower_case, to_upper_case, unquote,
|
||||
},
|
||||
error::SassResult,
|
||||
parse::Parser,
|
||||
value::Value,
|
||||
};
|
||||
|
||||
#[cfg(feature = "random")]
|
||||
@ -25,4 +18,5 @@ pub(crate) fn declare(f: &mut Module) {
|
||||
f.insert_builtin("to-upper-case", to_upper_case);
|
||||
#[cfg(feature = "random")]
|
||||
f.insert_builtin("unique-id", unique_id);
|
||||
f.insert_builtin("unquote", unquote);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user