update binaries

* copyright dates
* linting use statements

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2021-05-21 12:07:41 +02:00
parent dffac8ead2
commit 1ab02a1565
6 changed files with 33 additions and 21 deletions

View File

@@ -1,13 +1,15 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020-2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
fn main() { fn main() {
use advotracker_db::functions::db_connection::establish_connection; use advotracker_db::{
use advotracker_db::models::harms::Harm; functions::db_connection::establish_connection,
models::harms::Harm,
};
let connection = establish_connection(); let connection = establish_connection();

View File

@@ -1,16 +1,18 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020-2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
fn main() { fn main() {
use diesel::RunQueryDsl; use diesel::RunQueryDsl;
use advotracker_db::functions::db_connection::establish_connection; use advotracker_db::{
use advotracker_db::models::roles::Role; functions::db_connection::establish_connection,
use advotracker_db::schema::roles::dsl::*; models::roles::Role,
schema::roles::dsl::*,
};
let connection = establish_connection(); let connection = establish_connection();

View File

@@ -1,13 +1,16 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020-2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
fn main() { fn main() {
use advotracker_db::functions::db_connection::establish_connection;
use advotracker_db::models::users::User; use advotracker_db::{
functions::db_connection::establish_connection,
models::users::User,
};
let connection = establish_connection(); let connection = establish_connection();

View File

@@ -1,7 +1,7 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020_2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
@@ -9,8 +9,10 @@ fn main() {
use chrono::Local; use chrono::Local;
use std::io::{stdin, Read}; use std::io::{stdin, Read};
use advotracker_db::functions::db_connection::*; use advotracker_db::{
use advotracker_db::models::harms::Harm; functions::db_connection::*,
models::harms::Harm,
};
let connection = establish_connection(); let connection = establish_connection();

View File

@@ -1,15 +1,17 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020-2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
fn main() { fn main() {
use std::io::{stdin, Read}; use std::io::{stdin, Read};
use advotracker_db::functions::db_connection::*; use advotracker_db::{
use advotracker_db::models::roles::Role; functions::db_connection::*,
models::roles::Role,
};
let connection = establish_connection(); let connection = establish_connection();

View File

@@ -1,15 +1,17 @@
/* /*
* advotracker - Hotline tackingtool for Advocats * advotracker - Hotline tackingtool for Advocats
* *
* Copyright 2020 Ralf Zerres <ralf.zerres@networkx.de> * Copyright 2020-2021 Ralf Zerres <ralf.zerres@networkx.de>
* SPDX-License-Identifier: (0BSD or MIT) * SPDX-License-Identifier: (0BSD or MIT)
*/ */
fn main() { fn main() {
use std::io::{stdin, Read}; use std::io::{stdin, Read};
use advotracker_db::functions::db_connection::*; use advotracker_db::{
use advotracker_db::models::users::User; functions::db_connection::*,
models::users::User,
};
let connection = establish_connection(); let connection = establish_connection();
@@ -134,7 +136,6 @@ fn main() {
*/ */
// Some data structure. // Some data structure.
//use advotracker_db::models::users::User;
println!( println!(
"\nCreate new json stuct representing user: {} {}", "\nCreate new json stuct representing user: {} {}",
first_name, last_name first_name, last_name
@@ -168,7 +169,7 @@ fn main() {
/* /*
let user_id = 1; let user_id = 1;
let role_id = 1; let role_id = 1;
use advotracker_db::functions::roles::*; use advotrackerdb::functions::roles::*;
let _ = set_user_role(&connection, &user_id, &role_id); let _ = set_user_role(&connection, &user_id, &role_id);
*/ */
} }