Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rust 1.72.0 lints/warnings #3365

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"api/apiserver",
"api/apiclient",
Expand Down
3 changes: 1 addition & 2 deletions sources/api/storewolf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ fn parse_metadata_toml(md_toml_val: toml::Value) -> Result<Vec<model::Metadata>>
// Start at the root of the tree.
let mut to_process = vec![(Vec::new(), md_toml_val)];

while !to_process.is_empty() {
let (mut path, toml_value) = to_process.pop().unwrap();
while let Some((mut path, toml_value)) = to_process.pop() {
trace!("Current metadata table path: {:#?}", &path);

match toml_value {
Expand Down
8 changes: 4 additions & 4 deletions sources/models/scalar-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ impl StructInfo {
}
);

stream.append_all(impls.into_iter());
stream.append_all(impls);

// Generate code that is only applicable if the inner type can be treated like a String.
if self.as_ref_str {
Expand Down Expand Up @@ -481,7 +481,7 @@ impl StructInfo {
}
}
);
stream.append_all(code.into_iter());
stream.append_all(code);
}

// If the inner type is String, then we already have this implemented. If not, we can add
Expand All @@ -494,7 +494,7 @@ impl StructInfo {
}
}
);
stream.append_all(code.into_iter());
stream.append_all(code);
}
}
}
Expand Down Expand Up @@ -594,7 +594,7 @@ fn write_string_impls_for_enum(name: &str, ast: &mut TokenStream2) {
}
);

ast.append_all(impls.into_iter());
ast.append_all(impls);
}

/// Make sure all variants of the enum are empty of data. Otherwise we can't represent this enum
Expand Down
1 change: 1 addition & 0 deletions tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"infrasys",
"buildsys",
Expand Down
4 changes: 2 additions & 2 deletions tools/buildsys/src/gomod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const GO_MOD_DOCKER_SCRIPT_NAME: &str = "docker-go-script.sh";
// buildsys is executed from the context of many different package directories,
// managing a temporary file via this Rust module prevents having to acquire the
// path of some static script file on the host system.
const GO_MOD_SCRIPT_TMPL: &str = r###"#!/bin/bash
const GO_MOD_SCRIPT_TMPL: &str = r#".#!/bin/bash

set -e

Expand All @@ -68,7 +68,7 @@ popd
tar czf __OUTPUT__ "${targetdir}"/vendor
rm -rf "${targetdir}"
touch -r __LOCAL_FILE_NAME__ __OUTPUT__
"###;
"#;

impl GoMod {
pub(crate) fn vendor(
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsys/src/aws/promote_ssm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ fn merge_parameters(
source_parameters
.into_iter()
// Process the `set_parameters` second so that they overwrite existing values.
.chain(set_parameters.clone().into_iter())
.chain(set_parameters.clone())
.for_each(|(ssm_key, ssm_value)| {
combined_parameters
// The `entry()` API demands that we clone
Expand Down
2 changes: 1 addition & 1 deletion tools/pubsys/src/aws/publish_ami/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ pub(crate) async fn modify_regional_images(
info!("Modified permissions of image {} in {}", image_id, region);

// Set the `public` and `launch_permissions` fields for the Image object
let mut image = images.get_mut(&Region::new(region.clone())).ok_or(
let image = images.get_mut(&Region::new(region.clone())).ok_or(
error::Error::MissingRegion {
region: region.clone(),
},
Expand Down
1 change: 1 addition & 0 deletions variants/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"aws-dev",
"aws-ecs-1",
Expand Down