We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 138c450 commit 84f6fbaCopy full SHA for 84f6fba
core/src/util/over_ride.rs
@@ -137,6 +137,13 @@ impl<T: fmt::Display> fmt::Display for Override<T> {
137
/// Parses a `Meta`. A bare word will produce `Override::Inherit`, while
138
/// any value will be forwarded to `T::from_meta`.
139
impl<T: FromMeta> FromMeta for Override<T> {
140
+ fn from_meta(item: &syn::Meta) -> Result<Self> {
141
+ match item {
142
+ syn::Meta::Path(_) => Self::from_word(),
143
+ _ => FromMeta::from_meta(item).map(Explicit),
144
+ }
145
146
+
147
fn from_word() -> Result<Self> {
148
Ok(Inherit)
149
}
0 commit comments