We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f4d82b commit 9a6064cCopy full SHA for 9a6064c
1 file changed
libs/sheet/src/theme.rs
@@ -698,10 +698,15 @@ impl Theme {
698
699
// Sort variants: default first, then alphabetical
700
let mut sorted_variants: Vec<_> = themes.iter().collect();
701
- sorted_variants.sort_by(|a, b| match (a.0 == &default_key, b.0 == &default_key) {
702
- (true, false) => Ordering::Less,
703
- (false, true) => Ordering::Greater,
704
- _ => a.0.cmp(b.0),
+ let dk = &default_key;
+ sorted_variants.sort_by(|a, b| {
+ if a.0 == dk {
+ return Ordering::Less;
705
+ }
706
+ if b.0 == dk {
707
+ return Ordering::Greater;
708
709
+ a.0.cmp(b.0)
710
});
711
712
for (variant_name, token_theme) in &sorted_variants {
0 commit comments