Skip to content

Commit

Permalink
Use pattern match instead of unwrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
KitaitiMakoto committed Jan 16, 2021
1 parent 2483303 commit 42fb0cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plume-models/src/search/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
_ => {
Expand Down

0 comments on commit 42fb0cf

Please sign in to comment.