Skip to content

Commit 6d3ff14

Browse files
committed
add is_inherited method to InheritableField
1 parent e58ab62 commit 6d3ff14

File tree

1 file changed

+4
-0
lines changed
  • crates/cargo-util-schemas/src/manifest

1 file changed

+4
-0
lines changed

crates/cargo-util-schemas/src/manifest/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ impl<T> InheritableField<T> {
351351
InheritableField::Value(defined) => Some(defined),
352352
}
353353
}
354+
355+
pub fn is_inherited(&self) -> bool {
356+
matches!(self, Self::Inherit(_))
357+
}
354358
}
355359

356360
//. This already has a `Deserialize` impl from version_trim_whitespace

0 commit comments

Comments
 (0)