diff --git a/src/compressor.rs b/src/compressor.rs index 7a7279c..dfdf1e8 100644 --- a/src/compressor.rs +++ b/src/compressor.rs @@ -30,11 +30,11 @@ use indicatif::{ProgressBar, ProgressStyle}; use state_map::StateMap; +use std::collections::BTreeMap; use string_cache::DefaultAtom as Atom; -use std::collections::BTreeMap; - -use {collapse_state_maps, StateGroupEntry}; +use collapse_state_maps; +use StateGroupEntry; /// Holds information about a particular level. struct Level { diff --git a/src/database.rs b/src/database.rs index f2ced91..94f5ca1 100644 --- a/src/database.rs +++ b/src/database.rs @@ -15,12 +15,8 @@ use fallible_iterator::FallibleIterator; use indicatif::{ProgressBar, ProgressStyle}; use postgres::{Connection, TlsMode}; -use rand::distributions::Alphanumeric; -use rand::{thread_rng, Rng}; - -use std::borrow::Cow; -use std::collections::BTreeMap; -use std::fmt; +use rand::{distributions::Alphanumeric, thread_rng, Rng}; +use std::{borrow::Cow, collections::BTreeMap, fmt}; use StateGroupEntry; @@ -160,8 +156,8 @@ fn get_missing_from_db(conn: &Connection, missing_sgs: &[i64]) -> BTreeMap = - missing_sgs.iter() + let mut state_group_map: BTreeMap = missing_sgs + .iter() .map(|sg| (*sg, StateGroupEntry::default())) .collect(); diff --git a/src/main.rs b/src/main.rs index 2bbdb22..0ce34c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,13 +40,9 @@ use clap::{App, Arg}; use indicatif::{ProgressBar, ProgressStyle}; use rayon::prelude::*; use state_map::StateMap; +use std::{collections::BTreeMap, fs::File, io::Write, str::FromStr}; use string_cache::DefaultAtom as Atom; -use std::collections::BTreeMap; -use std::fs::File; -use std::io::Write; -use std::str::FromStr; - /// An entry for a state group. Consists of an (optional) previous group and the /// delta from that previous group (or the full state if no previous group) #[derive(Default, Debug, Clone, PartialEq, Eq)]