Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed May 26, 2018
1 parent 820a42e commit f18861d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/src/api.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use events::Key;
use hex;
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
2 changes: 1 addition & 1 deletion core/src/receive.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use events::{Key, Events};
use events::{Events, Key};
use key;
use std::str;
// we process these
Expand Down
9 changes: 2 additions & 7 deletions core/src/send.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use events::{Key, Events};
use events::{Events, Key};
use key;
// we process these
use events::SendEvent;
Expand Down Expand Up @@ -68,12 +68,7 @@ impl SendMachine {
es
}

fn deliver(
&self,
key: Key,
phase: String,
plaintext: Vec<u8>,
) -> Events {
fn deliver(&self, key: Key, phase: String, plaintext: Vec<u8>) -> Events {
let data_key = key::derive_phase_key(&self.side, &key, &phase);
let (_nonce, encrypted) = key::encrypt_data(data_key, &plaintext);
events![M_AddMessage(phase, encrypted)]
Expand Down

0 comments on commit f18861d

Please sign in to comment.