1--- a/src/util.rs 2006-07-24 03:21:28.000000000 +0200 2+++ b/src/util.rs 2024-03-21 14:59:03.494909986 +0100 3@@ -46,8 +46,9 @@ 4 static LIB_CRATE_MOD_PATH: Lazy<Result<String, String>> = Lazy::new(|| { 5 let file = manifest_path()?; 6 let cargo_toml_bytes = fs::read(file).map_err(|e| e.to_string())?; 7- 8- let cargo_toml = toml::from_slice::<CargoToml>(&cargo_toml_bytes) 9+ let cargo_toml_string = String::from_utf8(cargo_toml_bytes) 10+ .map_err(|e| format!("Could not UTF-8 decode `Cargo.toml`: {e}"))?; 11+ let cargo_toml = toml::from_str::<CargoToml>(&cargo_toml_string) 12 .map_err(|e| format!("Failed to parse `Cargo.toml`: {e}"))?; 13 14 let lib_crate_name = cargo_toml 15