mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
add is_inherited method to InheritableField
This commit is contained in:
parent
e58ab62a09
commit
6d3ff14969
@ -351,6 +351,10 @@ impl<T> InheritableField<T> {
|
||||
InheritableField::Value(defined) => Some(defined),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_inherited(&self) -> bool {
|
||||
matches!(self, Self::Inherit(_))
|
||||
}
|
||||
}
|
||||
|
||||
//. This already has a `Deserialize` impl from version_trim_whitespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user