Skip to content

Commit 7f0b853

Browse files
committed
Add default impl for as_any()
1 parent 85a14fd commit 7f0b853

File tree

1 file changed

+3
-1
lines changed
  • rust-runtime/aws-smithy-observability/src

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ pub trait ProvideMeter: Send + Sync + Debug {
2020

2121
/// Returns a reference to `self` as `&dyn Any` for downcasting.
2222
/// This allows type-based identification of meter providers.
23-
fn as_any(&self) -> &dyn std::any::Any;
23+
fn as_any(&self) -> &dyn std::any::Any {
24+
self
25+
}
2426

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

0 commit comments

Comments
 (0)