on master help sign in
fix lints
814dcfaDmitry Sharshakov
helix-dap/src/client.rs+1−1
@@ -54,7 +54,7 @@ impl Client {
54 port_arg: Option<String>,
54 port_arg: Option<String>,
55 id: usize,
55 id: usize,
56 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
56 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
57− if command == "" {
57+ if command.is_empty() {
58 return Result::Err(Error::Other(anyhow!("Command not provided")));
58 return Result::Err(Error::Other(anyhow!("Command not provided")));
59 }
59 }
60 if transport == "tcp" && port_arg.is_some() {
60 if transport == "tcp" && port_arg.is_some() {
helix-term/src/commands/dap.rs+3−2
@@ -232,9 +232,10 @@ pub fn dap_start_impl(
232 if cfg.completion == Some("filename".to_owned())
232 if cfg.completion == Some("filename".to_owned())
233 || cfg.completion == Some("directory".to_owned())
233 || cfg.completion == Some("directory".to_owned())
234 {
234 {
235− param = std::fs::canonicalize(x).ok()
235+ param = std::fs::canonicalize(x)
236+ .ok()
236 .and_then(|pb| pb.into_os_string().into_string().ok())
237 .and_then(|pb| pb.into_os_string().into_string().ok())
237− .unwrap_or(x.to_string());
238+ .unwrap_or_else(|| x.to_string());
238 }
239 }
239 }
240 }
240 // For param #0 replace {0} in args
241 // For param #0 replace {0} in args