aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_db/src/lib.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-28 00:06:40 +0000
committerFuwn <[email protected]>2021-05-28 00:06:40 +0000
commitd87b4825480f938cfa552421e220d8f85a1bee10 (patch)
treed9c69c0dc4f5a9e876460d10e101d936f424bee5 /crates/whirl_db/src/lib.rs
parentMerge branch 'develop' of https://github.com/Whirlsplash/whirl into develop (diff)
downloadwhirl-d87b4825480f938cfa552421e220d8f85a1bee10.tar.xz
whirl-d87b4825480f938cfa552421e220d8f85a1bee10.zip
fix(global): a lot of clippy warnings
This change makes clippy **a lot** more strict.
Diffstat (limited to 'crates/whirl_db/src/lib.rs')
-rw-r--r--crates/whirl_db/src/lib.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/whirl_db/src/lib.rs b/crates/whirl_db/src/lib.rs
index eda95bf..399e186 100644
--- a/crates/whirl_db/src/lib.rs
+++ b/crates/whirl_db/src/lib.rs
@@ -10,7 +10,15 @@
decl_macro,
proc_macro_hygiene
)]
-#![warn(rust_2018_idioms)]
+#![deny(
+ warnings,
+ nonstandard_style,
+ unused,
+ future_incompatible,
+ rust_2018_idioms,
+ unsafe_code
+)]
+#![deny(clippy::all, clippy::nursery, clippy::pedantic)]
#![recursion_limit = "128"]
#[macro_use]
@@ -23,7 +31,11 @@ use diesel::prelude::*;
// use crate::db::models::*;
-/// Establish a connection to the SQLite database.
+/// Establish a connection to the `SQLite` database.
+///
+/// # Panics
+/// - May panic if the database URL is inaccessible.
+#[must_use]
pub fn establish_connection() -> SqliteConnection {
let database_url = std::env::var("DATABASE_URL").unwrap_or_else(|_| "whirl.sqlite3".to_string());
SqliteConnection::establish(&database_url)