Format code with rustfmt
This commit is contained in:
@@ -30,11 +30,11 @@
|
|||||||
|
|
||||||
use indicatif::{ProgressBar, ProgressStyle};
|
use indicatif::{ProgressBar, ProgressStyle};
|
||||||
use state_map::StateMap;
|
use state_map::StateMap;
|
||||||
|
use std::collections::BTreeMap;
|
||||||
use string_cache::DefaultAtom as Atom;
|
use string_cache::DefaultAtom as Atom;
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use collapse_state_maps;
|
||||||
|
use StateGroupEntry;
|
||||||
use {collapse_state_maps, StateGroupEntry};
|
|
||||||
|
|
||||||
/// Holds information about a particular level.
|
/// Holds information about a particular level.
|
||||||
struct Level {
|
struct Level {
|
||||||
|
|||||||
@@ -15,12 +15,8 @@
|
|||||||
use fallible_iterator::FallibleIterator;
|
use fallible_iterator::FallibleIterator;
|
||||||
use indicatif::{ProgressBar, ProgressStyle};
|
use indicatif::{ProgressBar, ProgressStyle};
|
||||||
use postgres::{Connection, TlsMode};
|
use postgres::{Connection, TlsMode};
|
||||||
use rand::distributions::Alphanumeric;
|
use rand::{distributions::Alphanumeric, thread_rng, Rng};
|
||||||
use rand::{thread_rng, Rng};
|
use std::{borrow::Cow, collections::BTreeMap, fmt};
|
||||||
|
|
||||||
use std::borrow::Cow;
|
|
||||||
use std::collections::BTreeMap;
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
use StateGroupEntry;
|
use StateGroupEntry;
|
||||||
|
|
||||||
@@ -160,8 +156,8 @@ fn get_missing_from_db(conn: &Connection, missing_sgs: &[i64]) -> BTreeMap<i64,
|
|||||||
|
|
||||||
// initialise the map with empty entries (the missing group may not
|
// initialise the map with empty entries (the missing group may not
|
||||||
// have a prev_state_group either)
|
// have a prev_state_group either)
|
||||||
let mut state_group_map: BTreeMap<i64, StateGroupEntry> =
|
let mut state_group_map: BTreeMap<i64, StateGroupEntry> = missing_sgs
|
||||||
missing_sgs.iter()
|
.iter()
|
||||||
.map(|sg| (*sg, StateGroupEntry::default()))
|
.map(|sg| (*sg, StateGroupEntry::default()))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|||||||
@@ -40,13 +40,9 @@ use clap::{App, Arg};
|
|||||||
use indicatif::{ProgressBar, ProgressStyle};
|
use indicatif::{ProgressBar, ProgressStyle};
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use state_map::StateMap;
|
use state_map::StateMap;
|
||||||
|
use std::{collections::BTreeMap, fs::File, io::Write, str::FromStr};
|
||||||
use string_cache::DefaultAtom as Atom;
|
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
|
/// 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)
|
/// delta from that previous group (or the full state if no previous group)
|
||||||
#[derive(Default, Debug, Clone, PartialEq, Eq)]
|
#[derive(Default, Debug, Clone, PartialEq, Eq)]
|
||||||
|
|||||||
Reference in New Issue
Block a user