diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-12 01:40:46 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-12 01:40:46 -0400 |
commit | e45e35125e623a8fb683a28f55ad96d42d01a1d0 (patch) | |
tree | ffdf2130cb2197bc3e0769b732dfb4fc933b4618 /src/bin/rbw-agent/agent.rs | |
parent | 14b647f9d6dbb76960e6cad6f51531ea6a8dbf3a (diff) | |
download | rbw-e45e35125e623a8fb683a28f55ad96d42d01a1d0.tar.gz rbw-e45e35125e623a8fb683a28f55ad96d42d01a1d0.zip |
rename some stuff to be less confusing
Diffstat (limited to 'src/bin/rbw-agent/agent.rs')
-rw-r--r-- | src/bin/rbw-agent/agent.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/bin/rbw-agent/agent.rs b/src/bin/rbw-agent/agent.rs index f092787..46af63c 100644 --- a/src/bin/rbw-agent/agent.rs +++ b/src/bin/rbw-agent/agent.rs @@ -51,7 +51,7 @@ impl Agent { = handle_request(&mut sock, state.clone()).await; if let Err(e) = res { // unwrap is the only option here - sock.send(&rbw::agent::Response::Error { + sock.send(&rbw::protocol::Response::Error { error: format!("{:#}", e), }).await.unwrap(); } @@ -77,21 +77,21 @@ async fn handle_request( .await .context("failed to receive incoming message")?; match &req.action { - rbw::agent::Action::Login => { + rbw::protocol::Action::Login => { crate::actions::login(sock, state.clone(), req.tty.as_deref()) .await } - rbw::agent::Action::Unlock => { + rbw::protocol::Action::Unlock => { crate::actions::unlock(sock, state.clone(), req.tty.as_deref()) .await } - rbw::agent::Action::Lock => { + rbw::protocol::Action::Lock => { crate::actions::lock(sock, state.clone()).await } - rbw::agent::Action::Sync => crate::actions::sync(sock).await, - rbw::agent::Action::Decrypt { cipherstring } => { + rbw::protocol::Action::Sync => crate::actions::sync(sock).await, + rbw::protocol::Action::Decrypt { cipherstring } => { crate::actions::decrypt(sock, state.clone(), &cipherstring).await } - rbw::agent::Action::Quit => std::process::exit(0), + rbw::protocol::Action::Quit => std::process::exit(0), } } |