Skip to content

Commit cb8179a

Browse files
committed
run cargo fmt
1 parent 3fdd3e8 commit cb8179a

File tree

7 files changed

+6
-10
lines changed

7 files changed

+6
-10
lines changed

src/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use hash32::{BuildHasherDefault, Hash, Hasher};
55
use serde::de::{self, Deserialize, Deserializer, Error, MapAccess, SeqAccess};
66

77
use crate::{
8-
sealed::binary_heap::Kind as BinaryHeapKind,
98
indexmap::{Bucket, Pos},
9+
sealed::binary_heap::Kind as BinaryHeapKind,
1010
BinaryHeap, IndexMap, IndexSet, LinearMap, String, Vec,
1111
};
1212

src/indexmap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,5 +979,4 @@ mod tests {
979979
assert!(a == b);
980980
}
981981
}
982-
983982
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ pub use linear_map::LinearMap;
7676
pub use string::String;
7777
pub use vec::Vec;
7878

79+
// NOTE this code was last ported from v0.4.1 of the indexmap crate
7980
mod indexmap;
8081
mod indexset;
8182
mod linear_map;

src/mpmc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ unsafe fn dequeue<T>(buffer: *mut Cell<T>, dequeue_pos: &AtomicU8, mask: u8) ->
496496
} else if dif < 0 {
497497
return None;
498498
} else {
499-
if pos == 255 && dif == 255{
499+
if pos == 255 && dif == 255 {
500500
return None;
501501
} else {
502502
pos = dequeue_pos.load(Ordering::Relaxed);
@@ -568,7 +568,7 @@ mod tests {
568568
}
569569

570570
#[test]
571-
fn blocking(){
571+
fn blocking() {
572572
let q = Q2::new();
573573
for _ in 0..255 {
574574
q.enqueue(0).unwrap();

src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use hash32::{BuildHasher, Hash};
33
use serde::ser::{Serialize, SerializeMap, SerializeSeq, Serializer};
44

55
use crate::{
6-
sealed::binary_heap::Kind as BinaryHeapKind,
76
indexmap::{Bucket, Pos},
7+
sealed::binary_heap::Kind as BinaryHeapKind,
88
BinaryHeap, IndexMap, IndexSet, LinearMap, String, Vec,
99
};
1010

src/spsc/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,7 @@ macro_rules! impl_ {
373373
let p = self.0.buffer.as_ptr();
374374

375375
if *head != *tail {
376-
let item = unsafe {
377-
&*(p as *const T).add(usize::from(*head % cap))
378-
};
376+
let item = unsafe { &*(p as *const T).add(usize::from(*head % cap)) };
379377
Some(item)
380378
} else {
381379
None
@@ -921,5 +919,4 @@ mod tests {
921919
};
922920
assert_eq!(hash1, hash2);
923921
}
924-
925922
}

src/string.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,5 +788,4 @@ mod tests {
788788
assert_eq!(0, s.len());
789789
assert_eq!(8, s.capacity());
790790
}
791-
792791
}

0 commit comments

Comments
 (0)