From 0f1ecd2ca31244a2a884454c712a7ea291594d39 Mon Sep 17 00:00:00 2001 From: CreepySkeleton Date: Sat, 31 Aug 2019 01:46:49 +0300 Subject: [PATCH] Fix error messages --- CHANGELOG.md | 3 +++ structopt-derive/src/parse.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 535ecd97..69d8ae6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/structopt-derive/src/parse.rs b/structopt-derive/src/parse.rs index 0ef84231..cac73c09 100644 --- a/structopt-derive/src/parse.rs +++ b/structopt-derive/src/parse.rs @@ -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); } }; @@ -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") } } @@ -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),