1
0
Fork 0
mirror of https://git.42l.fr/neil/sncf.git synced 2024-05-03 22:43:10 +02:00

cargo clippy

This commit is contained in:
neil 2021-03-24 20:29:24 +01:00
parent c1191f3f45
commit 8276b35a01
3 changed files with 4 additions and 5 deletions

View file

@ -44,7 +44,7 @@ impl Form {
.execute(conn) .execute(conn)
} }
pub fn insert<'b>( pub fn insert(
i_form: InsertableForm, i_form: InsertableForm,
conn: &DbConn, conn: &DbConn,
) -> Result<InsertableForm, diesel::result::Error> { ) -> Result<InsertableForm, diesel::result::Error> {

View file

@ -59,7 +59,7 @@ async fn main() -> std::io::Result<()> {
println!("Checking configuration file..."); println!("Checking configuration file...");
CONFIG.check_version(); CONFIG.check_version();
if CONFIG.database_path.len() == 0 { if CONFIG.database_path.is_empty() {
println!("No database specified. Please enter a MySQL, PostgreSQL or SQLite connection string in config.toml."); println!("No database specified. Please enter a MySQL, PostgreSQL or SQLite connection string in config.toml.");
} }

View file

@ -59,11 +59,10 @@ pub fn check_new_form(body: &web::Bytes) -> u64 {
&& v["ocs"]["data"]["isAnonymous"] == Value::Null && v["ocs"]["data"]["isAnonymous"] == Value::Null
{ {
//getting form id //getting form id
let new_v_id = v["ocs"]["data"]["id"].as_u64().unwrap_or_else(|| { v["ocs"]["data"]["id"].as_u64().unwrap_or_else(|| {
eprintln!("check_new_form: failed to parse formid: {}", v); eprintln!("check_new_form: failed to parse formid: {}", v);
0 0
}); })
new_v_id
} else { } else {
eprintln!("error: check_new_form: can't find formid: {}", v); eprintln!("error: check_new_form: can't find formid: {}", v);
0 0