tailwind_css_fixes/systems/units/keyword_only/
traits.rs1use super::*;
2
3impl From<&str> for StandardValue {
4 fn from(kind: &str) -> Self {
5 Self::Keyword(kind.into())
6 }
7}
8
9impl From<String> for StandardValue {
10 fn from(kind: String) -> Self {
11 Self::Keyword(kind)
12 }
13}
14
15impl From<TailwindArbitrary> for StandardValue {
16 fn from(kind: TailwindArbitrary) -> Self {
17 Self::Arbitrary(kind)
18 }
19}
20
21impl Display for StandardValue {
22 fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
23 match self {
24 Self::Keyword(s) => write!(f, "{}", s),
25 Self::Arbitrary(s) => s.write(f),
26 }
27 }
28}