diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.rs | 10 | ||||
-rw-r--r-- | src/api.rs | 2 | ||||
-rw-r--r-- | src/pinentry.rs | 5 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/actions.rs b/src/actions.rs index f77378e..bda8670 100644 --- a/src/actions.rs +++ b/src/actions.rs @@ -275,10 +275,12 @@ async fn with_exchange_refresh_token_async<F, T>( ) -> Result<(Option<String>, T)> where F: Fn( - &str, - ) -> std::pin::Pin< - Box<dyn std::future::Future<Output = Result<T>> + Send>, - >, + &str, + ) -> std::pin::Pin< + Box<dyn std::future::Future<Output = Result<T>> + Send>, + > + Send + + Sync, + T: Send, { match f(access_token).await { Ok(t) => Ok((None, t)), @@ -173,7 +173,7 @@ impl SyncResCipher { username: login.username.clone(), password: login.password.clone(), uris: login.uris.as_ref().map_or_else( - || vec![], + std::vec::Vec::new, |uris| { uris.iter() .filter_map(|uri| uri.uri.clone()) diff --git a/src/pinentry.rs b/src/pinentry.rs index a215547..b9b3b11 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -75,7 +75,10 @@ async fn read_password< mut ncommands: u8, data: &mut [u8], mut r: R, -) -> Result<usize> { +) -> Result<usize> +where + R: Send, +{ let mut len = 0; loop { let nl = data.iter().take(len).position(|c| *c == b'\n'); |