This commit is contained in:
pgherveou committed 2025-10-08 06:28:57 +00:00
1 parent 765569a8b6
commit 1f84ce6f61
34 files changed
+1093 -503

No files matched your search

+4 -1
View File
@@ -27,7 +27,10 @@ pub fn read(path: impl AsRef<Path>) -> Result<Vec<u8>> {
pub fn read_to_string(path: impl AsRef<Path>) -> Result<String> {
let content = read(path)?;
String::from_utf8(content).map_err(|_| {
Error::new(std::io::ErrorKind::InvalidData, "The contents of the file are not valid UTF8")
Error::new(
std::io::ErrorKind::InvalidData,
"The contents of the file are not valid UTF8",
)
})
}