We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bc10a25 + e779ea0 commit 37f2263Copy full SHA for 37f2263
src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
@@ -783,9 +783,14 @@ impl GlobalState {
783
DiscoverProjectParam::Path(it) => DiscoverArgument::Path(it),
784
};
785
786
- let handle =
787
- discover.spawn(arg, &std::env::current_dir().unwrap()).unwrap();
788
- self.discover_handle = Some(handle);
+ let handle = discover.spawn(
+ arg,
+ &std::env::current_dir()
789
+ .expect("Failed to get cwd during project discovery"),
790
+ );
791
+ self.discover_handle = Some(handle.unwrap_or_else(|e| {
792
+ panic!("Failed to spawn project discovery command: {e}")
793
+ }));
794
}
795
796
0 commit comments