diff options
author | Alex Auvolat <alex@adnab.me> | 2020-11-20 23:20:20 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-11-20 23:53:54 +0100 |
commit | 68be5072e5b6cdf0192a3fbc92713047ccf0d372 (patch) | |
tree | f7bf208240a2a8783e9cd3ec1ceefd77fa017aa1 /src/model/key_table.rs | |
parent | 173f0dbac98f7962c75663cf7ee37c700596b40d (diff) | |
download | garage-68be5072e5b6cdf0192a3fbc92713047ccf0d372.tar.gz garage-68be5072e5b6cdf0192a3fbc92713047ccf0d372.zip |
simplify
Diffstat (limited to 'src/model/key_table.rs')
-rw-r--r-- | src/model/key_table.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/model/key_table.rs b/src/model/key_table.rs index ff9d7b79..20da3cc6 100644 --- a/src/model/key_table.rs +++ b/src/model/key_table.rs @@ -31,14 +31,13 @@ impl Key { pub fn new(name: String) -> Self { let key_id = format!("GK{}", hex::encode(&rand::random::<[u8; 12]>()[..])); let secret_key = hex::encode(&rand::random::<[u8; 32]>()[..]); - let ret = Self { + Self { key_id, secret_key, name: crdt::LWW::new(name), deleted: crdt::Bool::new(false), authorized_buckets: crdt::LWWMap::new(), - }; - ret + } } pub fn delete(key_id: String) -> Self { Self { |