Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FromMeta for unsigned arrays #122

Merged
merged 9 commits into from
Feb 16, 2021
Prev Previous commit
Next Next commit
Adds and updates examples to newly added FromMeta impl's.
Ryan Jennings committed Feb 9, 2021
commit a7fc4eb79e22ad4f42e59552ce9eab71f458d9f7
4 changes: 2 additions & 2 deletions core/src/from_meta.rs
Original file line number Diff line number Diff line change
@@ -246,7 +246,7 @@ impl<T: syn::parse::Parse, P: syn::parse::Parse> FromMeta for syn::punctuated::P
}
}

/// Parsing support for an array, i.e. `example = "\[1 + 2, 2 - 2, 3 * 4\]"`.
/// Parsing support for an array, i.e. `example = "[1 + 2, 2 - 2, 3 * 4]"`.
impl FromMeta for syn::ExprArray {
fn from_value(value: &Lit) -> Result<Self> {
if let Lit::Str(ref ident) = *value {
@@ -259,7 +259,7 @@ impl FromMeta for syn::ExprArray {
}
}

/// Parsing support for an unsigned integer array, i.e. `example = "\[1, 2, 3, 4\]"`.
/// Parsing support for an unsigned integer array, i.e. `example = "[1, 2, 3, 4]"`.
macro_rules! from_numeric_array {
($ty:ident) => {
impl FromMeta for Vec<$ty> {
TedDriggs marked this conversation as resolved.
Show resolved Hide resolved
TedDriggs marked this conversation as resolved.
Show resolved Hide resolved