fix: enforce condition element presence in Functions deserialization

feat: add binary target for rustfs
This commit is contained in:
DamonXue
2025-02-26 21:08:44 +08:00
parent 3b56bb69e6
commit bf3cc5c13c
2 changed files with 6 additions and 3 deletions

View File

@@ -131,9 +131,9 @@ impl<'de> Deserialize<'de> for Functions {
}
}
// if inner_data.is_empty() {
// return Err(Error::custom("has no condition element"));
// }
if inner_data.is_empty() {
return Err(Error::custom("has no condition element"));
}
Ok(inner_data)
}

View File

@@ -7,6 +7,9 @@ repository.workspace = true
rust-version.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]
name = "rustfs"
path = "src/main.rs"
[lints]
workspace = true