tailwind_css_fixes/systems/css_global/important/
methods.rs1use super::*;
2
3impl ImportantSet {
4 pub fn insert<T>(&mut self, value: T) -> bool
5 where
6 T: Into<String>,
7 {
8 self.important = false;
9 self.set.insert(value.into())
10 }
11 pub fn insert_important<T>(&mut self, value: T) -> bool
12 where
13 T: Into<String>,
14 {
15 self.important = true;
16 self.set.insert(value.into())
17 }
18 pub fn is_empty(&self) -> bool {
19 self.set.is_empty()
20 }
21}
22
23impl ImportantMap {
24 pub fn insert<K, V>(&mut self, key: K, value: V) -> bool
25 where
26 K: Into<String>,
27 V: Into<String>,
28 {
29 self.map.insert(key.into(), (false, value.into())).is_some()
30 }
31 pub fn insert_important<K, V>(&mut self, key: K, value: V) -> bool
32 where
33 K: Into<String>,
34 V: Into<String>,
35 {
36 self.map.insert(key.into(), (true, value.into())).is_some()
37 }
38}