diff --git a/crates/cargo-util-schemas/src/manifest/mod.rs b/crates/cargo-util-schemas/src/manifest/mod.rs index 101e8e1bdf3..bca5e2362c4 100644 --- a/crates/cargo-util-schemas/src/manifest/mod.rs +++ b/crates/cargo-util-schemas/src/manifest/mod.rs @@ -352,6 +352,13 @@ impl InheritableField { } } + pub fn into_value(self) -> Option { + match self { + Self::Inherit(_) => None, + Self::Value(defined) => Some(defined), + } + } + pub fn is_inherited(&self) -> bool { matches!(self, Self::Inherit(_)) }