Skip to content

Commit

Permalink
Merge pull request #55 from palfrey/import-format
Browse files Browse the repository at this point in the history
Fix formatting of imports
  • Loading branch information
palfrey committed May 15, 2022
2 parents 10895a2 + 0fc49bc commit 0960613
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
command: fmt
args: -- --check
if: ${{ matrix.features == 'default' }}
if: ${{ matrix.features == 'default' && matrix.rust == 'nightly' }}
- name: Clippy
uses: actions-rs/cargo@v1.0.3
env:
Expand Down
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports_granularity = "Crate"
newline_style = "Unix"
15 changes: 8 additions & 7 deletions serial_test/src/code_lock.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use lazy_static::lazy_static;
use parking_lot::{Mutex, ReentrantMutex, ReentrantMutexGuard, RwLock};
use std::cell::RefCell;
use std::collections::HashMap;
use std::ops::{Deref, DerefMut};
use std::sync::atomic::AtomicU32;
use std::sync::Arc;
use std::time::Duration;
use std::{
cell::RefCell,
collections::HashMap,
ops::{Deref, DerefMut},
sync::{atomic::AtomicU32, Arc},
time::Duration,
};

struct UniqueReentrantMutex {
mutex: ReentrantMutex<()>,
Expand Down Expand Up @@ -122,8 +123,8 @@ mod tests {
use super::{check_new_key, wait_duration, LOCKS};
use itertools::Itertools;
use parking_lot::RwLock;
use std::ops::Deref;
use std::{
ops::Deref,
sync::{Arc, Barrier},
thread,
};
Expand Down
18 changes: 10 additions & 8 deletions serial_test_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@
//! ```

use lazy_static::lazy_static;
use std::convert::TryInto;
use std::env;
use std::fs;
use std::sync::atomic::AtomicUsize;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use std::thread;
use std::time::Duration;
use std::{
convert::TryInto,
env, fs,
sync::{
atomic::{AtomicUsize, Ordering},
Arc,
},
thread,
time::Duration,
};

lazy_static! {
static ref LOCK: Arc<AtomicUsize> = Arc::new(AtomicUsize::new(0));
Expand Down

0 comments on commit 0960613

Please sign in to comment.