diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-28 10:46:49 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-28 12:19:22 +0300 |
commit | e35a93336a2c0ce081cd05f64986c6f6cdc59077 (patch) | |
tree | e36c7e99b24f7826980d5eec590551c68713d734 /ui/src/conf.rs | |
parent | 963fdd157503966d4ec16a9b175be6b2caa9fba6 (diff) |
Add GPG signing and sig verifying
Diffstat (limited to 'ui/src/conf.rs')
-rw-r--r-- | ui/src/conf.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ui/src/conf.rs b/ui/src/conf.rs index dc6cc169..33af0ced 100644 --- a/ui/src/conf.rs +++ b/ui/src/conf.rs @@ -58,7 +58,7 @@ macro_rules! split_command { }}; } -#[derive(Debug, Clone, PartialEq)] +#[derive(Copy, Debug, Clone, PartialEq)] pub enum ToggleFlag { Unset, InternalVal(bool), @@ -66,6 +66,16 @@ pub enum ToggleFlag { True, } +impl From<bool> for ToggleFlag { + fn from(val: bool) -> Self { + if val { + ToggleFlag::True + } else { + ToggleFlag::False + } + } +} + impl Default for ToggleFlag { fn default() -> Self { ToggleFlag::Unset |