From 42fb0cf8251e29fe45271dce9dad6ab6459a4cf1 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 11 Jan 2021 12:06:05 +0900 Subject: [PATCH] Use pattern match instead of unwrap() --- plume-models/src/search/actor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plume-models/src/search/actor.rs b/plume-models/src/search/actor.rs index 49852a95..b8724f2b 100644 --- a/plume-models/src/search/actor.rs +++ b/plume-models/src/search/actor.rs @@ -42,9 +42,9 @@ impl Actor for SearchActor { PostPublished(post) => { let conn = self.conn.get(); match conn { - Ok(_) => { + Ok(conn) => { self.searcher - .add_document(&conn.unwrap(), &post) + .add_document(&conn, &post) .unwrap_or_else(|e| error!("{:?}", e)); } _ => {