diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index b2c8be1..05ac9f0 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -2,7 +2,9 @@ name: Rust on: push: - branches: [main, Try] + branches: [main] + tags: + - v* pull_request: branches: [main] diff --git a/Cargo.toml b/Cargo.toml index 9cac7b4..df8c5bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ name = "cfg-rs" readme = 'README.md' repository = 'https://github.com/leptonyu/cfg-rs' rust-version = "1.64.0" -version = "0.3.0" +version = "0.3.1" [package.metadata.docs.rs] all-features = true diff --git a/src/value.rs b/src/value.rs index 90b635d..6881f1a 100644 --- a/src/value.rs +++ b/src/value.rs @@ -240,7 +240,7 @@ impl FromConfig for V { match value { None => Err(context.not_found()), Some(ConfigValue::Str(v)) if v.is_empty() => Self::empty_value(context), - Some(ConfigValue::StrRef(v)) if v.is_empty() => Self::empty_value(context), + Some(ConfigValue::StrRef("")) => Self::empty_value(context), Some(val) => V::from_value(context, val), } }