Clippy
This commit is contained in:
parent
3c11236404
commit
cf7a65674b
|
@ -23,11 +23,11 @@ pub struct Client {
|
|||
impl Client {
|
||||
/// Create a new database client
|
||||
pub fn new(credentials: DatabaseCredentials) -> Client {
|
||||
return Client {
|
||||
Client {
|
||||
credentials,
|
||||
mongo_client: None,
|
||||
database: None,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// Connect the client
|
||||
|
@ -76,7 +76,7 @@ impl Client {
|
|||
}
|
||||
}
|
||||
|
||||
if missing_collections.len() != 0 {
|
||||
if !missing_collections.is_empty() {
|
||||
panic!(
|
||||
"Missing the following the following collections: {}",
|
||||
missing_collections.join(", ")
|
||||
|
@ -115,7 +115,7 @@ impl Client {
|
|||
.expect("Could not issue request")
|
||||
.expect("Could not find matching data");
|
||||
|
||||
return from_bson(Bson::Document(result)).expect("Could not deserialize data");
|
||||
from_bson(Bson::Document(result)).expect("Could not deserialize data")
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
|
|
|
@ -35,11 +35,11 @@ pub struct Tag {
|
|||
|
||||
impl YorokobotModel for Guild {
|
||||
fn get_collection_name() -> String {
|
||||
return "guilds".to_string();
|
||||
"guilds".to_string()
|
||||
}
|
||||
}
|
||||
impl YorokobotModel for Tag {
|
||||
fn get_collection_name() -> String {
|
||||
return "traits".to_string();
|
||||
"traits".to_string()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ async fn main() -> std::process::ExitCode {
|
|||
|
||||
let credentials = ClientCredentials {
|
||||
discord_token: &discord_token,
|
||||
db_credentials: db_credentials,
|
||||
db_credentials,
|
||||
};
|
||||
|
||||
let mut client = match Client::new(credentials).await {
|
||||
|
|
Loading…
Reference in a new issue