diff --git a/core/src/api.rs b/core/src/api.rs index 58583a67..b0484540 100644 --- a/core/src/api.rs +++ b/core/src/api.rs @@ -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 { @@ -119,7 +120,7 @@ pub enum APIAction { // from WormholeCore out through IO glue to application GotWelcome(HashMap), // actually anything JSON-able: Value GotCode(String), // must be easy to canonically encode into UTF-8 bytes - GotUnverifiedKey(Vec), + GotUnverifiedKey(Key), GotVerifier(Vec), GotVersions(HashMap), // actually anything JSON-able GotMessage(Vec), diff --git a/core/src/boss.rs b/core/src/boss.rs index 8fa3c2c8..f90a9444 100644 --- a/core/src/boss.rs +++ b/core/src/boss.rs @@ -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),