diff --git a/plume-models/src/blogs.rs b/plume-models/src/blogs.rs index f2ea8235..f8fcffb3 100644 --- a/plume-models/src/blogs.rs +++ b/plume-models/src/blogs.rs @@ -202,14 +202,7 @@ impl Blog { .load::(&*c.conn)? .into_iter() .next(); - if let Some(from_db) = from_db { - Ok(from_db) - } else { - // we should never get here, because - // a) load::()? should return early if it fails - // b) this function is only called after a Request::guard::() - Err(Error::NotFound) - } + from_db.ok_or(Error::NotFound) } fn fetch_from_webfinger(c: &PlumeRocket, acct: &str) -> Result {