diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-12-28 19:09:31 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-12-28 19:09:32 +0100 |
commit | f8331574d0034e08c6326513a58310b7dec153dd (patch) | |
tree | 364c0cf8ffd6d949508e3b37b6dccdf5ff37127a /src/env.rs | |
parent | 1565ca6ccf4db827c2ab56417916d977c9c4959d (diff) |
Add #[must_use] annotations
Clippy nightly fails the checks because it wants us to have a
`#[must_use]` annotation on functions that return `Self`.
So we add these annotations with this patch.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/env.rs')
-rw-r--r-- | src/env.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -77,16 +77,19 @@ impl Environment { } } + #[must_use] pub fn prefix(mut self, s: &str) -> Self { self.prefix = Some(s.into()); self } + #[must_use] pub fn separator(mut self, s: &str) -> Self { self.separator = Some(s.into()); self } + #[must_use] pub fn ignore_empty(mut self, ignore: bool) -> Self { self.ignore_empty = ignore; self @@ -94,11 +97,13 @@ impl Environment { /// Note: enabling `try_parsing` can reduce performance it will try and parse /// each environment variable 3 times (bool, i64, f64) + #[must_use] pub fn try_parsing(mut self, try_parsing: bool) -> Self { self.try_parsing = try_parsing; self } + #[must_use] pub fn source(mut self, source: Option<Map<String, String>>) -> Self { self.source = source; self |