From c2ca714b23f5d4947b5ba3c8a9a6e5d98e710cc2 Mon Sep 17 00:00:00 2001 From: David Souther Date: Tue, 26 Sep 2023 15:49:12 -0400 Subject: [PATCH] Review updates --- .doc_gen/metadata/auto-scaling_metadata.yaml | 4 +--- rust_dev_preview/examples/auto-scaling/Cargo.toml | 2 +- rust_dev_preview/examples/auto-scaling/src/scenario.rs | 7 ++++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.doc_gen/metadata/auto-scaling_metadata.yaml b/.doc_gen/metadata/auto-scaling_metadata.yaml index 4836972a29f..621e9dd3be0 100644 --- a/.doc_gen/metadata/auto-scaling_metadata.yaml +++ b/.doc_gen/metadata/auto-scaling_metadata.yaml @@ -162,9 +162,7 @@ auto-scaling_DeleteAutoScalingGroup: - sdk_version: 3 github: python/example_code/auto-scaling excerpts: - - description: - Update the minimum size of an Auto Scaling group to zero, terminate all - instances in the group, and delete the group. + - description: Update the minimum size of an Auto Scaling group to zero, terminate all instances in the group, and delete the group. snippet_tags: - python.cross_service.resilient_service.AutoScaler.decl - python.cross_service.resilient_service.auto-scaling.DeleteAutoScalingGroup diff --git a/rust_dev_preview/examples/auto-scaling/Cargo.toml b/rust_dev_preview/examples/auto-scaling/Cargo.toml index 63dbc3315a8..60514e18223 100644 --- a/rust_dev_preview/examples/auto-scaling/Cargo.toml +++ b/rust_dev_preview/examples/auto-scaling/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "autoscaling-code-examples" version = "0.1.0" -authors = ["Doug Schwartz ", "David Souther "] +authors = ["Doug Schwartz ", "David Souther "] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust_dev_preview/examples/auto-scaling/src/scenario.rs b/rust_dev_preview/examples/auto-scaling/src/scenario.rs index 5146dd96365..3d3676317d3 100644 --- a/rust_dev_preview/examples/auto-scaling/src/scenario.rs +++ b/rust_dev_preview/examples/auto-scaling/src/scenario.rs @@ -167,7 +167,12 @@ impl ScenarioError { } } -impl Error for ScenarioError {} +impl Error for ScenarioError { + // While `Error` can capture `source` information about the underlying error, for this example + // the ScenarioError captures the underlying information in MetadataError and treats it as a + // single Error from this Crate. In other contexts, it may be appropriate to model the error + // as including the SdkError as its source. +} impl Display for ScenarioError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match &self.context {