on master help sign in
fix lints
commit814dcfa8d234e5031313b050b851641da8e6359b authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSun 26 Sep 2021, 21:54 (5 years ago) parentd943a51
2 files changed+4−3
helix-dap/src/client.rs+1−1 helix-term/src/commands/dap.rs+3−2
helix-dap/src/client.rs+1−1
@@ -54,7 +54,7 @@ impl Client {
5454 port_arg: Option<String>,
5555 id: usize,
5656 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
57− if command == "" {
57+ if command.is_empty() {
5858 return Result::Err(Error::Other(anyhow!("Command not provided")));
5959 }
6060 if transport == "tcp" && port_arg.is_some() {
helix-term/src/commands/dap.rs+3−2
@@ -232,9 +232,10 @@ pub fn dap_start_impl(
232232 if cfg.completion == Some("filename".to_owned())
233233 || cfg.completion == Some("directory".to_owned())
234234 {
235− param = std::fs::canonicalize(x).ok()
235+ param = std::fs::canonicalize(x)
236+ .ok()
236237 .and_then(|pb| pb.into_os_string().into_string().ok())
237− .unwrap_or(x.to_string());
238+ .unwrap_or_else(|| x.to_string());
238239 }
239240 }
240241 // For param #0 replace {0} in args