You've already forked AstralRinth
forked from didirus/AstralRinth
Run rustfmt on everything
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use diesel::prelude::*;
|
||||
use diesel::pg::PgConnection;
|
||||
use diesel::prelude::*;
|
||||
use dotenv::dotenv;
|
||||
use std::env;
|
||||
|
||||
pub fn connect() -> PgConnection{
|
||||
pub fn connect() -> PgConnection {
|
||||
dotenv().ok();
|
||||
|
||||
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set!");
|
||||
PgConnection::establish(&database_url).unwrap_or_else(|_| panic!("Error connecting to {}", database_url))
|
||||
PgConnection::establish(&database_url)
|
||||
.unwrap_or_else(|_| panic!("Error connecting to {}", database_url))
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ mod models;
|
||||
|
||||
pub use database::connect;
|
||||
pub use models::Mod;
|
||||
pub use models::Version;
|
||||
pub use models::Version;
|
||||
|
||||
@@ -10,7 +10,7 @@ pub struct Mod {
|
||||
pub downloads: i32,
|
||||
pub categories: Vec<String>,
|
||||
pub body_path: String,
|
||||
pub icon_path: String
|
||||
pub icon_path: String,
|
||||
}
|
||||
|
||||
#[derive(Queryable)]
|
||||
@@ -20,10 +20,9 @@ pub struct Version {
|
||||
pub title: String,
|
||||
pub changelog_path: String,
|
||||
pub files_path: Vec<String>,
|
||||
pub date_published: NaiveDate,
|
||||
pub date_published: NaiveDate,
|
||||
pub author: String,
|
||||
pub downloads: i32,
|
||||
pub dependencies: Vec<String>,
|
||||
pub game_versions: Vec<String>
|
||||
pub game_versions: Vec<String>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user