-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
itertools
dependency, make unique more efficient
- Loading branch information
1 parent
587d541
commit a0e70c2
Showing
8 changed files
with
65 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,34 @@ | ||
use eyre::Result; | ||
|
||
fn parse_apply_classes(_css_file: &str) -> Result<Vec<&str>> { | ||
Check failure on line 3 in rustywind-core/src/parser/css.rs GitHub Actions / clippyfunction `parse_apply_classes` is never used
|
||
todo!() | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
use pretty_assertions::assert_eq; | ||
use test_case::test_case; | ||
|
||
#[test_case( | ||
"@apply w-full opacity-0;", | ||
vec!["w-full", "opacity-0"] ; | ||
"basic apply directive" | ||
)] | ||
#[test_case( | ||
"@apply flex items-center;\nheight: 60px;\n@apply bg-gray-100;", | ||
vec!["flex", "items-center", "bg-gray-100"] ; | ||
"mixed content with multiple applies" | ||
)] | ||
#[test_case( | ||
"/* Header styles */\n@apply text-lg font-bold;", | ||
vec!["text-lg", "font-bold"] ; | ||
"with comments" | ||
)] | ||
#[test_case( "@apply;", vec![] ; "empty apply")] | ||
fn test_extract_apply_classes(input: &str, output: Vec<&str>) { | ||
let classes = parse_apply_classes(input); | ||
assert!(classes.is_ok()); | ||
assert_eq!(classes.unwrap(), output); | ||
} | ||
} |