Skip to content

Commit

Permalink
Fix error messages (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
CreepySkeleton authored and TeXitoi committed Aug 31, 2019
1 parent c72ad2f commit af85383
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v0.3.1 (2019-08-31)
* Fix error messages ([#241](https://github.com/TeXitoi/structopt/issues/241))

# v0.3.0 (2019-08-30)

## Breaking changes
Expand Down
6 changes: 3 additions & 3 deletions structopt-derive/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Parse for StructOptAttr {

let check_empty_lit = |s| {
if lit_str.is_empty() {
span_error!(lit.span(), "`#[structopt({} = \"\") is deprecated in structopt 3.0, now it's default behavior", s);
span_error!(lit.span(), "`#[structopt({} = \"\") is deprecated in structopt 0.3, now it's default behavior", s);
}
};

Expand Down Expand Up @@ -130,7 +130,7 @@ impl Parse for StructOptAttr {
}

Err(_) => span_error!(name.span(),
"`#[structopt(raw(...))` attributes are deprecated in structopt 3.0, only `raw(true)` and `raw(false)` are allowed")
"`#[structopt(raw(...))` attributes are deprecated in structopt 0.3, only `raw(true)` and `raw(false)` are allowed")
}
}

Expand All @@ -154,7 +154,7 @@ impl Parse for StructOptAttr {

"version" => {
span_error!(name.span(),
"#[structopt(version)] is invalid attribute, structopt 3.0 inherits version from Cargo.toml by default, no attribute needed")
"#[structopt(version)] is invalid attribute, structopt 0.3 inherits version from Cargo.toml by default, no attribute needed")
},

_ => span_error!(name.span(), "unexpected attribute: {}", name_str),
Expand Down

0 comments on commit af85383

Please sign in to comment.