Refactor errors

This commit is contained in:
2026-03-12 23:04:59 -07:00
parent 60483dd53d
commit 26a428dedc
17 changed files with 192 additions and 161 deletions

View File

@@ -41,13 +41,7 @@ impl TomlExtractor {
return Ok(x);
}
let mut reader = match self.item.read().await {
Ok(r) => r,
Err(e) if e.kind() == std::io::ErrorKind::NotFound => {
return Ok(self.output.get_or_init(HashMap::new));
}
Err(e) => return Err(e),
};
let mut reader = self.item.read().await?;
let bytes = reader.read_to_end().await?;
let toml: toml::Value = match toml::from_slice(&bytes) {
Ok(x) => x,