Skip to content

Commit

Permalink
fix(css-sytax-types): support < rust 1.83
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo committed Oct 21, 2024
1 parent c12fb84 commit 45f66b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/css-syntax-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ impl From<&Global> for Global {
impl std::str::FromStr for Global {
type Err = self::error::ConversionError;
fn from_str(value: &str) -> Result<Self, self::error::ConversionError> {
if let Ok(v) = value.parse() {
if let Ok(v) = value.parse::<Interface>() {
Ok(Self::Variant0(v))
} else {
let Ok(v) = value.parse();
let v = value.to_string();
Ok(Self::Variant1(v))
}
}
Expand Down

0 comments on commit 45f66b1

Please sign in to comment.