aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/rbw/actions.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-12-14 23:00:15 -0500
committerJesse Luehrs <doy@tozt.net>2021-12-15 12:45:54 -0500
commitacd1173848b4db1c733af7d3f53d24aab900b542 (patch)
treeb0a1151e390c6063169325bc4520d7b79ac50d9e /src/bin/rbw/actions.rs
parentcc20037ff21a259419c7c00f6fce82ded3888d1e (diff)
downloadrbw-acd1173848b4db1c733af7d3f53d24aab900b542.tar.gz
rbw-acd1173848b4db1c733af7d3f53d24aab900b542.zip
clippy
Diffstat (limited to 'src/bin/rbw/actions.rs')
-rw-r--r--src/bin/rbw/actions.rs10
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,
})?;