Unify service version, postcard, remove error overhead

This commit is contained in:
Dominik Werder
2023-07-20 16:46:40 +02:00
parent df091c0eb7
commit 9314c58a9b
26 changed files with 249 additions and 112 deletions

View File

@@ -76,9 +76,9 @@ async fn get_json_common(
if expect_finalised_range {
if !res
.get("rangeFinal")
.ok_or(Error::with_msg("missing rangeFinal"))?
.ok_or_else(|| Error::with_msg("missing rangeFinal"))?
.as_bool()
.ok_or(Error::with_msg("key rangeFinal not bool"))?
.ok_or_else(|| Error::with_msg("key rangeFinal not bool"))?
{
return Err(Error::with_msg("expected rangeFinal"));
}