Change imports_granularity to module

This reduces the overall amount of LoC that imports take up in our
codebase by almost 100.
It also makes merge-conflicts less likely because there is less
grouping together of imports that may lead to layout changes which
in turn can cause merge conflicts.
This commit is contained in:
Thomas Eizinger 2021-03-04 11:28:58 +11:00
parent 2c8200621d
commit 6d9b21cb47
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
55 changed files with 389 additions and 483 deletions

View file

@ -10,17 +10,13 @@ use crate::bitcoin;
use ::bitcoin::hashes::core::fmt::Formatter;
use anyhow::Result;
use rand::{CryptoRng, RngCore};
use rust_decimal::{
prelude::{FromPrimitive, ToPrimitive},
Decimal,
};
use rust_decimal::prelude::{FromPrimitive, ToPrimitive};
use rust_decimal::Decimal;
use serde::{Deserialize, Serialize};
use std::{
convert::TryFrom,
fmt::Display,
ops::{Add, Mul, Sub},
str::FromStr,
};
use std::convert::TryFrom;
use std::fmt::Display;
use std::ops::{Add, Mul, Sub};
use std::str::FromStr;
pub const PICONERO_OFFSET: u64 = 1_000_000_000_000;
@ -198,12 +194,13 @@ pub struct BalanceTooLow {
pub struct OverflowError(pub String);
pub mod monero_private_key {
use monero::{
consensus::{Decodable, Encodable},
PrivateKey,
};
use serde::{de, de::Visitor, ser::Error, Deserializer, Serializer};
use std::{fmt, io::Cursor};
use monero::consensus::{Decodable, Encodable};
use monero::PrivateKey;
use serde::de::Visitor;
use serde::ser::Error;
use serde::{de, Deserializer, Serializer};
use std::fmt;
use std::io::Cursor;
struct BytesVisitor;