diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2020-08-23 16:17:42 +0200 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2021-01-10 17:37:53 -0800 |
commit | 4f37ab793f2a094ce24e010c06d9c71ab95873a7 (patch) | |
tree | 2baf7538c67a6b0142fc8daf31363e0f818a490e /src/pinentry.rs | |
parent | ac19dd1b91ee29bf67c44503c99297483df5c374 (diff) | |
download | nitrocli-4f37ab793f2a094ce24e010c06d9c71ab95873a7.tar.gz nitrocli-4f37ab793f2a094ce24e010c06d9c71ab95873a7.tar.bz2 |
Merge ExecCtx and RunCtx into Context
Since we moved the model, no_cache and verbosity fields from ExecCtx
into Config and added a Config field to both ExecCtx and RunCtx, RunCtx
and ExecCtx are identical. Therefore this patch merges the ExecCtx and
RunCtx structs into the new Context struct.
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r-- | src/pinentry.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pinentry.rs b/src/pinentry.rs index f538a47..937d8df 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -25,7 +25,7 @@ use std::str; use anyhow::Context as _; use crate::args; -use crate::ExecCtx; +use crate::Context; type CowStr = borrow::Cow<'static, str>; @@ -228,7 +228,7 @@ where /// dialog. It is used to choose an appropriate description and to /// decide whether a quality bar is shown in the dialog. pub fn inquire<E>( - ctx: &mut ExecCtx<'_>, + ctx: &mut Context<'_>, entry: &E, mode: Mode, error_msg: Option<&str>, @@ -283,7 +283,7 @@ where } } -pub fn choose<E>(ctx: &mut ExecCtx<'_>, entry: &E) -> anyhow::Result<String> +pub fn choose<E>(ctx: &mut Context<'_>, entry: &E) -> anyhow::Result<String> where E: SecretEntry, { |