Skip to content

Commit

Permalink
switch from expect to unwrap for consistency (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbr authored Jul 14, 2023
1 parent 13ebe38 commit 8ace125
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ pub struct Db(DbConn);

impl Db {
pub async fn connect(url: &str) -> Self {
Database::connect(url)
.await
.map(Self)
.expect("could not connect to the database")
Database::connect(url).await.map(Self).unwrap()
}
}

Expand Down

0 comments on commit 8ace125

Please sign in to comment.