Skip to content

Commit

Permalink
fix: clone clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dariocurr committed May 17, 2024
1 parent cabfd18 commit d8ba90a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions env-settings-derive/src/utils/attributes/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ impl EnvSettingsInnerParams {
let params = EnvSettingsInput::parse_attributes(attributes)?;
let mut env_settings_inner_params = EnvSettingsInnerParams::default();
if let Some(default) = params.get("default") {
env_settings_inner_params.default = default.to_owned();
default.clone_into(&mut env_settings_inner_params.default);
}
if let Some(variable) = params.get("variable") {
env_settings_inner_params.variable = variable.to_owned();
variable.clone_into(&mut env_settings_inner_params.variable);
}
if params.contains_key("skip") {
env_settings_inner_params.skip = true;
Expand Down
4 changes: 2 additions & 2 deletions env-settings-derive/src/utils/attributes/outer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ impl EnvSettingsOuterParams {
env_settings_outer_params.delay = true;
}
if let Some(file_path) = params.get("file_path") {
env_settings_outer_params.file_path = file_path.to_owned();
file_path.clone_into(&mut env_settings_outer_params.file_path);
}
if let Some(prefix) = params.get("prefix") {
env_settings_outer_params.prefix = prefix.to_owned();
prefix.clone_into(&mut env_settings_outer_params.prefix);
};
Ok(env_settings_outer_params)
}
Expand Down
2 changes: 1 addition & 1 deletion env-settings-derive/src/utils/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl EnvSettingsField {
let mut segments = type_path.path.segments.to_owned();
let optional_type = Self::get_optional_type(&segments);
if let Some(Type::Path(optional_type_path)) = &optional_type {
segments = optional_type_path.path.segments.to_owned();
optional_type_path.path.segments.clone_into(&mut segments);
}
let type_label = segments
.into_iter()
Expand Down

0 comments on commit d8ba90a

Please sign in to comment.