Skip to content

Commit 433fbe0

Browse files
committed
Bump aws-smithy-observability to 0.1.6 for new trait methods
1 parent 4bdc5a1 commit 433fbe0

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

rust-runtime/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-runtime/aws-smithy-observability/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-smithy-observability"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
authors = [
55
"AWS Rust SDK Team <[email protected]>",
66
]
@@ -23,3 +23,4 @@ targets = ["x86_64-unknown-linux-gnu"]
2323
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
2424
rustdoc-args = ["--cfg", "docsrs"]
2525
# End of docs.rs metadata
26+

rust-runtime/aws-smithy-observability/src/meter.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ pub trait ProvideMeter: Send + Sync + Debug {
1919
fn get_meter(&self, scope: &'static str, attributes: Option<&Attributes>) -> Meter;
2020

2121
/// Returns a reference to `self` as `&dyn Any` for downcasting.
22-
fn as_any(&self) -> &dyn std::any::Any;
22+
///
23+
/// The default implementation returns a reference to the unit type,
24+
/// which will fail any downcast attempts. Implementations should override
25+
/// this to return `self` for proper type inspection.
26+
fn as_any(&self) -> &dyn std::any::Any {
27+
&()
28+
}
2329

2430
/// Returns the name of this provider implementation.
2531
/// This is used for feature tracking without requiring type imports.

0 commit comments

Comments
 (0)