From 8fbcb519636f3066fc90686593fc5323d73e4e80 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Mon, 5 Sep 2022 22:33:46 +0200 Subject: [PATCH] node: Infer the arg type Signed-off-by: Alexis Sellier --- node/src/control.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/node/src/control.rs b/node/src/control.rs index 9554f05e..e42f022f 100644 --- a/node/src/control.rs +++ b/node/src/control.rs @@ -4,12 +4,10 @@ use std::io::BufReader; use std::os::unix::net::UnixListener; use std::os::unix::net::UnixStream; use std::path::Path; -use std::str::FromStr; use std::{fs, io, net}; use crate::client; use crate::client::handle::traits::Handle; -use crate::identity::ProjId; /// Default name for control socket file. pub const DEFAULT_SOCKET_NAME: &str = "radicle.sock"; @@ -65,7 +63,7 @@ fn drain(stream: &UnixStream, handle: &H) -> Result<(), DrainError> { for line in reader.by_ref().lines().flatten() { match line.split_once(' ') { Some(("update", arg)) => { - if let Ok(id) = ProjId::from_str(arg) { + if let Ok(id) = arg.parse() { if let Err(e) = handle.updated(id) { return Err(DrainError::Client(e)); }