aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-07-11 20:09:09 -0400
committerJesse Luehrs <doy@tozt.net>2020-07-11 20:09:09 -0400
commit600169f0bb0798007b59c18d0342091f1d952d6d (patch)
tree0f7c5ad37013f14f2979f9d2d40aea7f08d607e1 /src
parentee881dc4243a1975d2f7f0d8bbfb8b54b933dfc9 (diff)
downloadrbw-600169f0bb0798007b59c18d0342091f1d952d6d.tar.gz
rbw-600169f0bb0798007b59c18d0342091f1d952d6d.zip
clippy
Diffstat (limited to 'src')
-rw-r--r--src/actions.rs10
-rw-r--r--src/api.rs2
-rw-r--r--src/pinentry.rs5
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)),
diff --git a/src/api.rs b/src/api.rs
index aec1398..6ee77ca 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -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');