Skip to content

Commit

Permalink
Fixes a panic caused by unwrapping an option (#105)
Browse files Browse the repository at this point in the history
* Fixes a panic caused by unwrapping an option

* updating to 0.19.2 to fix regression 104
  • Loading branch information
Peternator7 committed Aug 6, 2020
1 parent 06bbb62 commit 3299622
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
@@ -1,8 +1,14 @@
# Changelog

## 0.20.0
## 0.19.2

* Fixes [#104](https://github.com/Peternator7/strum/issues/104). PR [#105](https://github.com/Peternator7/strum/issues/105)

## 0.19.1

* **Breaking Change**: EnumVariantNames now properly adjusts to the `to_string` and `serialize` attributes.
* There's a regression in this release that may make strum imcompatible with other plugins if those
plugins use non-rust syntax in their attributes. [#104](https://github.com/Peternator7/strum/issues/104)

## 0.19.0

Expand Down
6 changes: 3 additions & 3 deletions strum/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "strum"
version = "0.19.1"
version = "0.19.2"
authors = ["Peter Glotfelty <peter.glotfelty@microsoft.com>"]
license = "MIT"

Expand All @@ -14,10 +14,10 @@ repository = "https://github.com/Peternator7/strum"
readme = "../README.md"

[dependencies]
strum_macros = { path = "../strum_macros", optional = true, version = "0.19.0" }
strum_macros = { path = "../strum_macros", optional = true, version = "0.19.2" }

[dev-dependencies]
strum_macros = { path = "../strum_macros", version = "0.19.0" }
strum_macros = { path = "../strum_macros", version = "0.19.2" }

[badges]
travis-ci = { repository = "Peternator7/strum" }
Expand Down
2 changes: 1 addition & 1 deletion strum_macros/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "strum_macros"
version = "0.19.1"
version = "0.19.2"
authors = ["Peter Glotfelty <peter.glotfelty@microsoft.com>"]
license = "MIT"

Expand Down
2 changes: 1 addition & 1 deletion strum_macros/src/helpers/has_metadata.rs
Expand Up @@ -11,7 +11,7 @@ fn get_metadata_inner<'a>(
it: impl IntoIterator<Item = &'a syn::Attribute>,
) -> Vec<syn::Meta> {
it.into_iter()
.map(|attr| attr.parse_meta().unwrap())
.filter_map(|attr| attr.parse_meta().ok())
.filter_map(|meta| match meta {
syn::Meta::List(syn::MetaList { path, nested, .. }) => {
if path.is_ident(ident) {
Expand Down

0 comments on commit 3299622

Please sign in to comment.