Skip to content

Commit bf9b8b7

Browse files
authored
Update Rust to 1.87.0 (#772)
1 parent ba6df4e commit bf9b8b7

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
docker_container_repo_dir=/app
55

66
# Common docker options
7-
rust_docker_container := public.ecr.aws/docker/library/rust:1.86.0
7+
rust_docker_container := public.ecr.aws/docker/library/rust:1.87.0
88

99
docker_opts_shared := --rm -v "$(PWD)":$(docker_container_repo_dir) -w $(docker_container_repo_dir)
1010
rust_docker_run := docker run -v $(PWD):/$(docker_container_repo_dir) -w $(docker_container_repo_dir) -it -e TEST_ALL_PLUGINS -e CARGO_HOME=/app/.cargo $(rust_docker_container)

wp_contextual/src/wp_contextual.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ fn parse_fields(
157157
.into_syn_error(attr.meta.span()))
158158
}
159159
} else {
160-
Ok(WpParsedAttr::ExternalAttr { attr: attr.clone() })
160+
Ok(WpParsedAttr::ExternalAttr {
161+
attr: Box::new(attr.clone()),
162+
})
161163
}
162164
})
163165
.collect::<Result<Vec<WpParsedAttr>, syn::Error>>()?;
@@ -394,7 +396,7 @@ impl GeneratedContextualField {
394396
.filter_map(|parsed_attr| {
395397
// The generated field should only contain external attributes
396398
if let WpParsedAttr::ExternalAttr { attr } = parsed_attr {
397-
Some(attr.to_owned())
399+
Some(*attr.clone())
398400
} else {
399401
None
400402
}
@@ -715,7 +717,7 @@ enum WpParsedAttr {
715717
ParsedWpContextualField,
716718
ParsedWpContextualOption,
717719
ParsedWpContext { contexts: Vec<WpContextAttr> },
718-
ExternalAttr { attr: syn::Attribute },
720+
ExternalAttr { attr: Box<syn::Attribute> },
719721
}
720722

721723
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]

wp_derive_request_builder/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ fn read_crate_config() -> CrateConfig {
2727
let manifest_dir = env::var("CARGO_MANIFEST_DIR")
2828
.expect("Crate config can't be found without the `CARGO_MANIFEST_DIR` environment varible");
2929
let file_path = format!("{}/wp_derived_request.toml", manifest_dir);
30-
let contents = match fs::read_to_string(&file_path) {
30+
match fs::read_to_string(&file_path) {
3131
Ok(c) => toml::from_str(c.as_str())
3232
.unwrap_or_else(|e| panic!("'{}' is not formatted correctly:\n{:#?}", file_path, e)),
3333
Err(_) => {
3434
panic!("{} is missing", file_path);
3535
}
36-
};
37-
contents
36+
}
3837
}

wp_derive_request_builder/src/variant_attr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ impl ParsedVariantAttribute {
8989
if let syn::Meta::List(meta_list) = attr.meta {
9090
Ok(meta_list)
9191
} else {
92-
Err(
93-
ItemVariantAttributeParseError::MetaInWrongFormat { meta: attr.meta }
94-
.into_syn_error(input.span()),
95-
)
92+
Err(ItemVariantAttributeParseError::MetaInWrongFormat {
93+
meta: Box::new(attr.meta),
94+
}
95+
.into_syn_error(input.span()))
9696
}
9797
}
9898

@@ -373,7 +373,7 @@ enum ItemVariantAttributeParseError {
373373
#[error("Only a single attribute is supported")]
374374
MoreThanOneOuterAttr,
375375
#[error("Expecting a syn::Meta::List found {:?}", meta)]
376-
MetaInWrongFormat { meta: syn::Meta },
376+
MetaInWrongFormat { meta: Box<syn::Meta> },
377377
#[error(
378378
"Expecting key value pairs (url = \"\", params = FooParam, output = FooOutput, filter_by = FooSparseField)"
379379
)]

wp_rs_web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.86.0 AS builder
1+
FROM rust:1.87.0 AS builder
22

33
WORKDIR /app
44

0 commit comments

Comments
 (0)