impl Clone for MemoryKeystore (#2131)

This commit is contained in:
yjh
2023-11-02 19:45:24 +08:00
committed by GitHub
parent 10857d0b58
commit 29b4bd4233
+1 -1
View File
@@ -32,7 +32,7 @@ use parking_lot::RwLock;
use std::{collections::HashMap, sync::Arc};
/// A keystore implementation usable in tests.
#[derive(Default)]
#[derive(Default, Clone)]
pub struct MemoryKeystore {
/// `KeyTypeId` maps to public keys and public keys map to private keys.
keys: Arc<RwLock<HashMap<KeyTypeId, HashMap<Vec<u8>, String>>>>,