Skip to content

Commit 052c950

Browse files
Merge pull request #237 from matthiasbeyer/fix-nightly-clippy
Fix nightly clippy issues
2 parents 3b45e7f + c55b649 commit 052c950

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

src/builder.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,7 @@ pub struct DefaultState {
120120
///
121121
/// Refer to [`ConfigBuilder`] for similar API sample usage or to the examples folder of the crate, where such a source is implemented.
122122
#[derive(Debug, Clone, Default)]
123-
pub struct AsyncConfigBuilder {
124-
defaults: Map<Expression, Value>,
125-
overrides: Map<Expression, Value>,
126-
sources: Vec<SourceType>,
127-
}
123+
pub struct AsyncConfigBuilder {}
128124

129125
/// Represents data specific to builder in asychronous state, with support for async.
130126
#[derive(Debug, Default)]

src/env.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::map::Map;
55
use crate::source::Source;
66
use crate::value::{Value, ValueKind};
77

8-
#[derive(Clone, Debug)]
8+
#[derive(Clone, Debug, Default)]
99
pub struct Environment {
1010
/// Optional prefix that will limit access to the environment to only keys that
1111
/// begin with the defined prefix.
@@ -63,17 +63,6 @@ impl Environment {
6363
}
6464
}
6565

66-
impl Default for Environment {
67-
fn default() -> Environment {
68-
Environment {
69-
prefix: None,
70-
separator: None,
71-
ignore_empty: false,
72-
try_parsing: false,
73-
}
74-
}
75-
}
76-
7766
impl Source for Environment {
7867
fn clone_into_box(&self) -> Box<dyn Source + Send + Sync> {
7968
Box::new((*self).clone())

src/path/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl Expression {
193193
match value.kind {
194194
ValueKind::Table(ref incoming_map) => {
195195
// Pull out another table
196-
let mut target = if let ValueKind::Table(ref mut map) = root.kind {
196+
let target = if let ValueKind::Table(ref mut map) = root.kind {
197197
map.entry(id.clone())
198198
.or_insert_with(|| Map::<String, Value>::new().into())
199199
} else {
@@ -202,7 +202,7 @@ impl Expression {
202202

203203
// Continue the deep merge
204204
for (key, val) in incoming_map {
205-
Expression::Identifier(key.clone()).set(&mut target, val.clone());
205+
Expression::Identifier(key.clone()).set(target, val.clone());
206206
}
207207
}
208208

0 commit comments

Comments
 (0)