Skip to content

Commit

Permalink
Fix list_key
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Apr 14, 2024
1 parent 95e130a commit e606e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/key_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use super::{
getters(style = "ref", vis_all = "pub"),
setters(skip)
)]
#[derive(Default)]
#[derive(Default, Debug)]
pub struct KeyResponse<I> {
/// Map of node id to response message
messages: HashMap<I, SmolStr>,
Expand Down Expand Up @@ -227,7 +227,7 @@ where
resp.num_resp += 1;

// Decode the response
if !r.payload.is_empty() || r.payload[0] != MessageType::KeyResponse as u8 {
if r.payload.is_empty() || r.payload[0] != MessageType::KeyResponse as u8 {
resp.messages.insert(
r.from.id().cheap_clone(),
SmolStr::new(format!(
Expand Down
1 change: 1 addition & 0 deletions core/src/serf/base/tests/serf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ pub async fn serf_write_keyring_file<T>(

let resp = manager.list_keys().await.unwrap();
assert_eq!(resp.primary_keys().len(), 1);
assert_eq!(resp.keys().len(), 1);
}

#[test]
Expand Down

0 comments on commit e606e3a

Please sign in to comment.