Skip to content

Commit

Permalink
Remove redundant bound from ResolveCachedIdentity
Browse files Browse the repository at this point in the history
  • Loading branch information
jdisanti committed Oct 12, 2023
1 parent 4dd095f commit 4574ba7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
9 changes: 2 additions & 7 deletions rust-runtime/aws-smithy-runtime-api/src/client/identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ pub trait ResolveCachedIdentity: fmt::Debug + Send + Sync {
&'a self,
resolver: SharedIdentityResolver,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>
where
Self: 'a;
) -> IdentityFuture<'a>;
}

/// Shared identity cache.
Expand All @@ -80,10 +78,7 @@ impl ResolveCachedIdentity for SharedIdentityCache {
&'a self,
resolver: SharedIdentityResolver,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>
where
Self: 'a,
{
) -> IdentityFuture<'a> {
self.0.resolve_cached_identity(resolver, config_bag)
}
}
Expand Down
5 changes: 1 addition & 4 deletions rust-runtime/aws-smithy-runtime/src/client/identity/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ impl ResolveCachedIdentity for NoCache {
&'a self,
resolver: SharedIdentityResolver,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>
where
Self: 'a,
{
) -> IdentityFuture<'a> {
IdentityFuture::new(async move { resolver.resolve_identity(config_bag).await })
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,7 @@ impl ResolveCachedIdentity for LazyCache {
&'a self,
resolver: SharedIdentityResolver,
config_bag: &'a ConfigBag,
) -> IdentityFuture<'a>
where
Self: 'a,
{
) -> IdentityFuture<'a> {
let time = self.time.clone();
let now = self.time.now();
let timeout_future = self.sleeper.sleep(self.load_timeout);
Expand Down

0 comments on commit 4574ba7

Please sign in to comment.