Skip to content

Commit

Permalink
Make formatting of imports consistent
Browse files Browse the repository at this point in the history
Unfortunately the `imports_granularity` option of rustfmt
I used to automate this change is unstable:

rust-lang/rustfmt#4991
  • Loading branch information
lunacookies committed Oct 23, 2021
1 parent 7712c5a commit 4fe91ed
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
3 changes: 1 addition & 2 deletions crates/model/src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ use history_keeper::HistoryKeeper;
pub use kind::{Kind, KindSet};

use crate::direction::Direction;
use crate::position::InScreenBounds;
use crate::position::Position;
use crate::position::{InScreenBounds, Position};
use rng::Rng;

pub struct Pipe {
Expand Down
3 changes: 2 additions & 1 deletion crates/model/src/pipe/color.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use rng::Rng;
use std::{ops::Range, str::FromStr};
use std::ops::Range;
use std::str::FromStr;
use tincture::ColorSpace;

pub(super) fn gen_random_color(
Expand Down
4 changes: 3 additions & 1 deletion crates/pipes-rs/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ use anyhow::Context;
use etcetera::app_strategy::{AppStrategy, AppStrategyArgs, Xdg};
use model::pipe::{ColorMode, Kind, KindSet, Palette};
use serde::{Deserialize, Serialize};
use std::{fs, path::PathBuf, time::Duration};
use std::fs;
use std::path::PathBuf;
use std::time::Duration;
use structopt::clap::AppSettings;
use structopt::StructOpt;

Expand Down
6 changes: 2 additions & 4 deletions crates/pipes-rs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
mod config;
pub use config::Config;

use model::{
pipe::{KindSet, Pipe},
position::InScreenBounds,
};
use model::pipe::{KindSet, Pipe};
use model::position::InScreenBounds;
use rng::Rng;
use std::thread;
use terminal::{Backend, Event, Terminal};
Expand Down
11 changes: 5 additions & 6 deletions crates/terminal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ mod void_backend;
pub use stdout_backend::StdoutBackend;
pub use void_backend::VoidBackend;

use crossterm::{
cursor,
event::{Event as CrosstermEvent, KeyCode, KeyEvent, KeyModifiers},
queue, style, terminal,
};
use crossterm::event::{Event as CrosstermEvent, KeyCode, KeyEvent, KeyModifiers};
use crossterm::{cursor, queue, style, terminal};
use screen::Screen;
use std::{io::Write, num::NonZeroUsize, thread};
use std::io::Write;
use std::num::NonZeroUsize;
use std::thread;
use unicode_width::UnicodeWidthChar;

pub struct Terminal<B: Backend> {
Expand Down

0 comments on commit 4fe91ed

Please sign in to comment.