diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-14 23:00:15 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-15 12:45:54 -0500 |
commit | acd1173848b4db1c733af7d3f53d24aab900b542 (patch) | |
tree | b0a1151e390c6063169325bc4520d7b79ac50d9e /src/bin/rbw/actions.rs | |
parent | cc20037ff21a259419c7c00f6fce82ded3888d1e (diff) | |
download | rbw-acd1173848b4db1c733af7d3f53d24aab900b542.tar.gz rbw-acd1173848b4db1c733af7d3f53d24aab900b542.zip |
clippy
Diffstat (limited to 'src/bin/rbw/actions.rs')
-rw-r--r-- | src/bin/rbw/actions.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/rbw/actions.rs b/src/bin/rbw/actions.rs index 39fde15..321bff5 100644 --- a/src/bin/rbw/actions.rs +++ b/src/bin/rbw/actions.rs @@ -35,7 +35,7 @@ pub fn quit() -> anyhow::Result<()> { sock.send(&rbw::protocol::Request { tty: nix::unistd::ttyname(0) .ok() - .and_then(|p| p.to_str().map(|s| s.to_string())), + .and_then(|p| p.to_str().map(std::string::ToString::to_string)), action: rbw::protocol::Action::Quit, })?; wait_for_exit(pid); @@ -59,7 +59,7 @@ pub fn decrypt( sock.send(&rbw::protocol::Request { tty: nix::unistd::ttyname(0) .ok() - .and_then(|p| p.to_str().map(|s| s.to_string())), + .and_then(|p| p.to_str().map(std::string::ToString::to_string)), action: rbw::protocol::Action::Decrypt { cipherstring: cipherstring.to_string(), org_id: org_id.map(std::string::ToString::to_string), @@ -84,7 +84,7 @@ pub fn encrypt( sock.send(&rbw::protocol::Request { tty: nix::unistd::ttyname(0) .ok() - .and_then(|p| p.to_str().map(|s| s.to_string())), + .and_then(|p| p.to_str().map(std::string::ToString::to_string)), action: rbw::protocol::Action::Encrypt { plaintext: plaintext.to_string(), org_id: org_id.map(std::string::ToString::to_string), @@ -106,7 +106,7 @@ pub fn version() -> anyhow::Result<u32> { sock.send(&rbw::protocol::Request { tty: nix::unistd::ttyname(0) .ok() - .and_then(|p| p.to_str().map(|s| s.to_string())), + .and_then(|p| p.to_str().map(std::string::ToString::to_string)), action: rbw::protocol::Action::Version, })?; @@ -126,7 +126,7 @@ fn simple_action(action: rbw::protocol::Action) -> anyhow::Result<()> { sock.send(&rbw::protocol::Request { tty: nix::unistd::ttyname(0) .ok() - .and_then(|p| p.to_str().map(|s| s.to_string())), + .and_then(|p| p.to_str().map(std::string::ToString::to_string)), action, })?; |