From 05194a0d8eee5c1bc25f92a185687771a044e006 Mon Sep 17 00:00:00 2001 From: Cory Grinstead Date: Tue, 19 Sep 2023 08:41:37 -0500 Subject: [PATCH] Update object_store/src/client/header.rs Co-authored-by: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> --- object_store/src/client/header.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/object_store/src/client/header.rs b/object_store/src/client/header.rs index 1003814519fa..081bb697917c 100644 --- a/object_store/src/client/header.rs +++ b/object_store/src/client/header.rs @@ -100,13 +100,8 @@ pub fn header_meta( let e_tag = e_tag.to_str().context(BadHeaderSnafu)?; Some(e_tag.to_string()) } - None => { - if cfg.etag_required { - return Err(Error::MissingEtag); - } else { - None - } - } + None if cfg.etag_required => return Err(Error::MissingEtag), + None => None, }; let content_length = headers