Skip to content

Commit

Permalink
impl into string
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbuilds committed Jun 17, 2024
1 parent 5b3537d commit 7d8a5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,8 @@ impl GmailAuth {
middleware: Arc::new(mw),
}
}
pub fn oauth2(access: String, refresh: String, callback: Option<Box<dyn Fn(RefreshData) + Send + Sync + 'static>>) -> Self {
let mut mw = shared_oauth2_flow().bearer_middleware(access, refresh);
pub fn oauth2(access: impl Into<String>, refresh: impl Into<String>, callback: Option<Box<dyn Fn(RefreshData) + Send + Sync + 'static>>) -> Self {
let mut mw = shared_oauth2_flow().bearer_middleware(access.into(), refresh.into());
if let Some(cb) = callback {
mw.callback(cb);
}
Expand Down

0 comments on commit 7d8a5f7

Please sign in to comment.