Skip to content

Commit

Permalink
use Key in APIEvent::GotUnverifiedKey
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed May 26, 2018
1 parent b1937fa commit 820a42e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::collections::HashMap;
use std::error::Error;
use std::fmt;
use util::maybe_utf8;
use events::Key;

#[derive(PartialEq)]
pub enum APIEvent {
Expand Down Expand Up @@ -119,7 +120,7 @@ pub enum APIAction {
// from WormholeCore out through IO glue to application
GotWelcome(HashMap<String, String>), // actually anything JSON-able: Value
GotCode(String), // must be easy to canonically encode into UTF-8 bytes
GotUnverifiedKey(Vec<u8>),
GotUnverifiedKey(Key),
GotVerifier(Vec<u8>),
GotVersions(HashMap<String, String>), // actually anything JSON-able
GotMessage(Vec<u8>),
Expand Down
2 changes: 1 addition & 1 deletion core/src/boss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl BossMachine {
use events::BossEvent::*;
match event {
GotCode(code) => self.got_code(&code),
GotKey(key) => events![APIAction::GotUnverifiedKey(key.to_vec())],
GotKey(key) => events![APIAction::GotUnverifiedKey(key.clone())],
Happy => self.happy(),
GotVerifier(verifier) => events![APIAction::GotVerifier(verifier)],
GotMessage(phase, plaintext) => self.got_message(&phase, plaintext),
Expand Down

0 comments on commit 820a42e

Please sign in to comment.