mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-25 11:30:31 +00:00
Use pattern match instead of unwrap()
This commit is contained in:
parent
2483303138
commit
42fb0cf825
1 changed files with 2 additions and 2 deletions
|
@ -42,9 +42,9 @@ impl Actor for SearchActor {
|
||||||
PostPublished(post) => {
|
PostPublished(post) => {
|
||||||
let conn = self.conn.get();
|
let conn = self.conn.get();
|
||||||
match conn {
|
match conn {
|
||||||
Ok(_) => {
|
Ok(conn) => {
|
||||||
self.searcher
|
self.searcher
|
||||||
.add_document(&conn.unwrap(), &post)
|
.add_document(&conn, &post)
|
||||||
.unwrap_or_else(|e| error!("{:?}", e));
|
.unwrap_or_else(|e| error!("{:?}", e));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Reference in a new issue