summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-10-02 20:39:19 +0200
committerGitHub <noreply@github.com>2021-10-02 20:39:19 +0200
commit052c9503c65ee66074d00e8885aa13e6831bf079 (patch)
tree164d0f50adeb5222a41b0cfd10223170227293ef /src
parent3b45e7fea062de30659b011735243904cf0ae62c (diff)
parentc55b6493a88853ac4db4360f15c781f3ae49d62b (diff)
Merge pull request #237 from matthiasbeyer/fix-nightly-clippy
Fix nightly clippy issues
Diffstat (limited to 'src')
-rw-r--r--src/builder.rs6
-rw-r--r--src/env.rs13
-rw-r--r--src/path/mod.rs4
3 files changed, 4 insertions, 19 deletions
diff --git a/src/builder.rs b/src/builder.rs
index e629606..7a26151 100644
--- a/src/builder.rs
+++ b/src/builder.rs
@@ -120,11 +120,7 @@ pub struct DefaultState {
///
/// Refer to [`ConfigBuilder`] for similar API sample usage or to the examples folder of the crate, where such a source is implemented.
#[derive(Debug, Clone, Default)]
-pub struct AsyncConfigBuilder {
- defaults: Map<Expression, Value>,
- overrides: Map<Expression, Value>,
- sources: Vec<SourceType>,
-}
+pub struct AsyncConfigBuilder {}
/// Represents data specific to builder in asychronous state, with support for async.
#[derive(Debug, Default)]
diff --git a/src/env.rs b/src/env.rs
index 736d584..4ea7bd0 100644
--- a/src/env.rs
+++ b/src/env.rs
@@ -5,7 +5,7 @@ use crate::map::Map;
use crate::source::Source;
use crate::value::{Value, ValueKind};
-#[derive(Clone, Debug)]
+#[derive(Clone, Debug, Default)]
pub struct Environment {
/// Optional prefix that will limit access to the environment to only keys that
/// begin with the defined prefix.
@@ -63,17 +63,6 @@ impl Environment {
}
}
-impl Default for Environment {
- fn default() -> Environment {
- Environment {
- prefix: None,
- separator: None,
- ignore_empty: false,
- try_parsing: false,
- }
- }
-}
-
impl Source for Environment {
fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> {
Box::new((*self).clone())
diff --git a/src/path/mod.rs b/src/path/mod.rs
index cd7ccd7..24a6325 100644
--- a/src/path/mod.rs
+++ b/src/path/mod.rs
@@ -193,7 +193,7 @@ impl Expression {
match value.kind {
ValueKind::Table(ref incoming_map) => {
// Pull out another table
- let mut target = if let ValueKind::Table(ref mut map) = root.kind {
+ let target = if let ValueKind::Table(ref mut map) = root.kind {
map.entry(id.clone())
.or_insert_with(|| Map::<String, Value>::new().into())
} else {
@@ -202,7 +202,7 @@ impl Expression {
// Continue the deep merge
for (key, val) in incoming_map {
- Expression::Identifier(key.clone()).set(&mut target, val.clone());
+ Expression::Identifier(key.clone()).set(target, val.clone());
}
}