Skip to content

Commit

Permalink
Fix some compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed May 28, 2024
1 parent cbebb66 commit 6bd6982
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/wit-parser/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl PackageMetadata {
Ok(serde_json::from_slice(&data[1..])?)
}

#[cfg(feature = "serde")]
fn is_compatible_with_v0(&self) -> bool {
self.worlds.iter().all(|(_, w)| w.is_compatible_with_v0())
&& self
Expand Down Expand Up @@ -476,6 +477,7 @@ impl WorldMetadata {
&& self.interface_export_stability.is_empty()
}

#[cfg(feature = "serde")]
fn is_compatible_with_v0(&self) -> bool {
self.stability.is_unknown()
&& self
Expand Down Expand Up @@ -574,6 +576,7 @@ impl InterfaceMetadata {
&& self.stability.is_unknown()
}

#[cfg(feature = "serde")]
fn is_compatible_with_v0(&self) -> bool {
self.stability.is_unknown()
&& self.funcs.iter().all(|(_, w)| w.is_compatible_with_v0())
Expand Down Expand Up @@ -642,6 +645,7 @@ impl FunctionMetadata {
}
}

#[cfg(feature = "serde")]
fn is_compatible_with_v0(&self) -> bool {
match self {
FunctionMetadata::JustDocs(_) => true,
Expand Down Expand Up @@ -761,6 +765,7 @@ impl TypeMetadata {
self.docs.is_none() && self.items.is_empty() && self.stability.is_unknown()
}

#[cfg(feature = "serde")]
fn is_compatible_with_v0(&self) -> bool {
self.stability.is_unknown()
}
Expand Down

0 comments on commit 6bd6982

Please sign in to comment.