Skip to content

Commit

Permalink
Return None if the document is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
arpad-m committed Jun 22, 2024
1 parent 0b0ab11 commit ecfc030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/remote_storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ impl RemoteStorageConfig {
_ => bail!("toml not a table or inline table"),
};

if document.is_empty() {
return Ok(None);
}

Ok(Some(toml_edit::de::from_document(document)?))
}
}
Expand Down

0 comments on commit ecfc030

Please sign in to comment.