Skip to content

Commit 18ae057

Browse files
committed
graph: Avoid using let _
1 parent 04c038f commit 18ae057

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graph/src/log/elastic.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl ElasticDrain {
262262
let client = Client::new();
263263
let logger_for_err = flush_logger.clone();
264264

265-
let _ = client
265+
client
266266
.post(batch_url)
267267
.header("Content-Type", "application/json")
268268
.basic_auth(
@@ -272,7 +272,8 @@ impl ElasticDrain {
272272
.body(batch_body)
273273
.send()
274274
.and_then(|response| async { response.error_for_status() })
275-
.map_err(move |e| {
275+
.map_ok(|_| ())
276+
.unwrap_or_else(move |e| {
276277
// Log if there was a problem sending the logs
277278
error!(
278279
logger_for_err,

0 commit comments

Comments
 (0)