Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
1use anyhow::{Context, Result}; 2use cargo_metadata::{Metadata, MetadataCommand}; 3 4/// Returns the Cargo workspace. 5pub fn load_workspace() -> Result<Metadata> { 6 MetadataCommand::new() 7 .exec() 8 .context("failed to load cargo metadata") 9}