Skip to content

Commit

Permalink
default token source: avoid double boxing error (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
danburkert authored Nov 7, 2023
1 parent 00d3365 commit 62c4dee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion foundation/auth/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub struct DefaultTokenSource {
#[async_trait]
impl TokenSource for DefaultTokenSource {
async fn token(&self) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
let token = self.inner.token().await.map_err(Box::new)?;
let token = self.inner.token().await?;
Ok(format!("Bearer {0}", token.access_token))
}
}

0 comments on commit 62c4dee

Please sign in to comment.