From e0e35d9a94e76854a8d91f8bc7e38b4335468806 Mon Sep 17 00:00:00 2001 From: John DiSanti Date: Fri, 16 Feb 2024 15:26:51 -0800 Subject: [PATCH] Fix release-mode warnings in aws-smithy-runtime-api (#3423) _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --- .../aws-smithy-runtime-api/src/client/retries/classifiers.rs | 4 ++-- .../aws-smithy-runtime-api/src/client/runtime_components.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rust-runtime/aws-smithy-runtime-api/src/client/retries/classifiers.rs b/rust-runtime/aws-smithy-runtime-api/src/client/retries/classifiers.rs index ee66f7fdb..7fa744e7c 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/client/retries/classifiers.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/client/retries/classifiers.rs @@ -279,14 +279,14 @@ impl ClassifyRetry for SharedRetryClassifier { impl ValidateConfig for SharedRetryClassifier { fn validate_final_config( &self, - runtime_components: &RuntimeComponents, + _runtime_components: &RuntimeComponents, _cfg: &ConfigBag, ) -> Result<(), BoxError> { #[cfg(debug_assertions)] { // Because this is validating that the implementation is correct rather // than validating user input, we only want to run this in debug builds. - let retry_classifiers = runtime_components.retry_classifiers_slice(); + let retry_classifiers = _runtime_components.retry_classifiers_slice(); let out_of_order: Vec<_> = retry_classifiers .windows(2) .filter(|&w| w[0].value().priority() > w[1].value().priority()) diff --git a/rust-runtime/aws-smithy-runtime-api/src/client/runtime_components.rs b/rust-runtime/aws-smithy-runtime-api/src/client/runtime_components.rs index 4480779a0..b438e4286 100644 --- a/rust-runtime/aws-smithy-runtime-api/src/client/runtime_components.rs +++ b/rust-runtime/aws-smithy-runtime-api/src/client/runtime_components.rs @@ -425,6 +425,7 @@ impl RuntimeComponents { } // Needed for `impl ValidateConfig for SharedRetryClassifier {` + #[cfg(debug_assertions)] pub(crate) fn retry_classifiers_slice(&self) -> &[Tracked] { self.retry_classifiers.as_slice() } @@ -883,6 +884,7 @@ impl Tracked { } } + #[cfg(debug_assertions)] pub(crate) fn value(&self) -> &T { &self.value } -- GitLab