aboutsummaryrefslogtreecommitdiff
path: root/mling/src/proj_mgr/metadata.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-07 19:41:57 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-07 19:41:57 +0800
commita88a4478bfa9c18d49296460b98c0512f34794c4 (patch)
treecfb5bd9a2406ba30c21af9a10476c924ae129794 /mling/src/proj_mgr/metadata.rs
parent50b34e06ad186a7fffff3a8c49b3f198118c87ce (diff)
Add installer module and refactor error handling
Diffstat (limited to 'mling/src/proj_mgr/metadata.rs')
-rw-r--r--mling/src/proj_mgr/metadata.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mling/src/proj_mgr/metadata.rs b/mling/src/proj_mgr/metadata.rs
index 84da69f..1ba24e1 100644
--- a/mling/src/proj_mgr/metadata.rs
+++ b/mling/src/proj_mgr/metadata.rs
@@ -16,10 +16,10 @@ pub fn read_metadata(cargo_toml: &PathBuf) -> Result<CargoLockFile, std::io::Err
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr);
- return Err(std::io::Error::new(
- std::io::ErrorKind::Other,
- format!("cargo metadata failed: {}", stderr),
- ));
+ return Err(std::io::Error::other(format!(
+ "cargo metadata failed: {}",
+ stderr
+ )));
}
let lock_file: CargoLockFile = serde_json::from_slice(&output.stdout)