drop redundant feature flags, as behavour is consistent between sass syntax types

This commit is contained in:
Yiffy Dev 2024-10-30 17:42:26 +05:00 • committed by spushk
commit 4c9713141f
Signed by: spushk
GPG key ID: 7797B761E105E8AA
2 changed files with 6 additions and 66 deletions

View file

@ -24,5 +24,3 @@ serde = {version = "^1.0", features = ["derive"]}
toml = {version = "^0.8"}
[features]
sass = []
scss = []

View file

@ -89,18 +89,14 @@ pub enum SabryCompilerError {
/// Unification wrapper over all the Syntax enums
#[derive(Clone, Copy)]
pub enum CompilerSyntax {
#[cfg(feature = "sass")]
Sass,
#[cfg(feature = "scss")]
Scss,
}
impl From<raffia::Syntax> for CompilerSyntax {
fn from(value: raffia::Syntax) -> Self {
match value {
#[cfg(feature = "sass")]
raffia::Syntax::Sass => Self::Sass,
#[cfg(feature = "scss")]
raffia::Syntax::Scss => Self::Scss,
// TODO: fallbacky error-prone
_ => Self::Scss,
@ -111,9 +107,7 @@ impl From<raffia::Syntax> for CompilerSyntax {
impl From<CompilerSyntax> for grass::InputSyntax {
fn from(value: CompilerSyntax) -> Self {
match value {
#[cfg(feature = "scss")]
CompilerSyntax::Scss => Self::Scss,
#[cfg(feature = "sass")]
CompilerSyntax::Sass => Self::Sass,
}
}