Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gbmor committed Sep 3, 2019
1 parent 442912d commit c3f1e93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions rtcoin-server/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See LICENSE file for detailed license information.
//

use std::{path::Path, sync::mpsc, thread};
use std::{path::Path, sync::mpsc};

use log::info;

Expand Down Expand Up @@ -202,14 +202,14 @@ impl DB {
fn startup_check_tables(conn: &rusqlite::Connection) {
conn.execute(
"CREATE TABLE IF NOT EXISTS ledger (
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
type TEXT NOT NULL,
timestamp TEXT NOT NULL,
source TEXT NOT NULL,
destination TEXT NOT NULL,
amount REAL NOT NULL,
ledger_hash TEXT NOT NULL,
receipt_id INTEGER NOT NULL,
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
type TEXT NOT NULL,
timestamp TEXT NOT NULL,
source TEXT NOT NULL,
destination TEXT NOT NULL,
amount REAL NOT NULL,
ledger_hash TEXT NOT NULL,
receipt_id INTEGER NOT NULL,
receipt_hash TEXT NOT NULL
)",
NO_PARAMS,
Expand Down
4 changes: 2 additions & 2 deletions rtcoin-server/src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl fmt::Display for User {
}

impl User {
pub fn new(name: &str) -> User {
pub fn new(name: &str) -> Self {
let pass = String::new();
let name = name.to_string();
let now = Utc::now().to_rfc2822();
Expand Down Expand Up @@ -93,7 +93,7 @@ pub fn register(comm: db::Comm, db: &rusqlite::Connection) {
None => return,
};
let user = args[0].clone();
let mut pass = args[1].clone();
let pass = args[1].clone();
let pubkey = args[2].clone();

match check_pass(&pass) {
Expand Down

0 comments on commit c3f1e93

Please sign in to comment.