diff --git a/age/src/cli_common.rs b/age/src/cli_common.rs index 1b14db65..5fe4746a 100644 --- a/age/src/cli_common.rs +++ b/age/src/cli_common.rs @@ -26,13 +26,13 @@ pub fn read_identities( filenames: Vec, file_not_found: G, #[cfg(feature = "ssh")] unsupported_ssh: impl Fn(String, crate::ssh::UnsupportedKey) -> E, -) -> Result>, E> +) -> Result>, E> where E: From, E: From, G: Fn(String) -> E, { - let mut identities: Vec> = vec![]; + let mut identities: Vec> = vec![]; #[cfg(feature = "plugin")] let mut plugin_identities: Vec = vec![]; @@ -68,7 +68,7 @@ where identities.extend( new_ids .into_iter() - .map(|i| Box::new(i) as Box), + .map(|i| Box::new(i) as Box), ); #[cfg(feature = "plugin")] diff --git a/rage/src/bin/rage-mount/main.rs b/rage/src/bin/rage-mount/main.rs index 5be5c938..95e57b8b 100644 --- a/rage/src/bin/rage-mount/main.rs +++ b/rage/src/bin/rage-mount/main.rs @@ -267,7 +267,7 @@ fn main() -> Result<(), Error> { } decryptor - .decrypt(identities.iter().map(|i| &**i)) + .decrypt(identities.iter().map(|i| i.as_ref() as &dyn age::Identity)) .map_err(|e| e.into()) .and_then(|stream| mount_stream(stream, types, mountpoint)) }