diff --git a/crates/project/src/debugger/breakpoint_store.rs b/crates/project/src/debugger/breakpoint_store.rs index 7da8a180887a6f8ee9107201b1ee2c2d650cce20..d548781891598b229c430692bee36919bf7669fb 100644 --- a/crates/project/src/debugger/breakpoint_store.rs +++ b/crates/project/src/debugger/breakpoint_store.rs @@ -316,7 +316,7 @@ impl BreakpointStore { for (path, breakpoint_set) in &self.breakpoints { let _ = client.send(proto::BreakpointsForFile { project_id: *project_id, - path: path.to_str().map(ToOwned::to_owned).unwrap(), + path: path.to_string_lossy().into_owned(), breakpoints: breakpoint_set .breakpoints .iter() @@ -553,7 +553,7 @@ impl BreakpointStore { { cx.background_spawn(remote.upstream_client.request(proto::ToggleBreakpoint { project_id: remote.upstream_project_id, - path: abs_path.to_str().map(ToOwned::to_owned).unwrap(), + path: abs_path.to_string_lossy().into_owned(), breakpoint: Some(breakpoint), })) .detach(); @@ -577,7 +577,7 @@ impl BreakpointStore { let _ = client.send(proto::BreakpointsForFile { project_id: *project_id, - path: abs_path.to_str().map(ToOwned::to_owned).unwrap(), + path: abs_path.to_string_lossy().into_owned(), breakpoints, }); }