Skip to content

Commit

Permalink
Cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
orlp committed Jul 3, 2021
1 parent 5338288 commit 2f4120c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,10 +520,7 @@ impl<K: Key, V> SlotMap<K, V> {
/// assert_eq!(v, vec![(k, 0)]);
/// ```
pub fn drain(&mut self) -> Drain<K, V> {
Drain {
cur: 1,
sm: self,
}
Drain { cur: 1, sm: self }
}

/// Returns a reference to the value corresponding to the key.
Expand Down Expand Up @@ -1243,7 +1240,7 @@ mod serialize {
mod tests {
use super::*;
use quickcheck::quickcheck;
use std::collections::{HashSet, HashMap};
use std::collections::{HashMap, HashSet};

#[derive(Clone)]
struct CountDrop<'a>(&'a std::cell::RefCell<usize>);
Expand Down
2 changes: 1 addition & 1 deletion src/dense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ mod serialize {
mod tests {
use super::*;
use quickcheck::quickcheck;
use std::collections::{HashSet, HashMap};
use std::collections::{HashMap, HashSet};

#[derive(Clone)]
struct CountDrop<'a>(&'a core::cell::RefCell<usize>);
Expand Down
2 changes: 1 addition & 1 deletion src/hop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ mod serialize {
mod tests {
use super::*;
use quickcheck::quickcheck;
use std::collections::{HashSet, HashMap};
use std::collections::{HashMap, HashSet};

#[derive(Clone)]
struct CountDrop<'a>(&'a std::cell::RefCell<usize>);
Expand Down
7 changes: 2 additions & 5 deletions src/secondary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,7 @@ impl<K: Key, V> SecondaryMap<K, V> {
/// assert_eq!(v, vec![(k, 1)]);
/// ```
pub fn drain(&mut self) -> Drain<K, V> {
Drain {
cur: 1,
sm: self,
}
Drain { cur: 1, sm: self }
}

/// Returns a reference to the value corresponding to the key.
Expand Down Expand Up @@ -1283,7 +1280,7 @@ impl<'a, K: Key, V> VacantEntry<'a, K, V> {
// Despite the slot being considered Vacant for this entry, it might be occupied
// with an outdated element.
match replace(slot, Slot::new_occupied(self.kd.version.get(), value)) {
Occupied { .. } => {},
Occupied { .. } => {}
Vacant => self.map.num_elems += 1,
}
unsafe { slot.get_unchecked_mut() }
Expand Down

0 comments on commit 2f4120c

Please sign in to comment.