Show More
@@ -11,9 +11,12 b'' | |||
|
11 | 11 | use crate::{ |
|
12 | 12 | dirstate::EntryState, utils::files, DirstateEntry, DirstateMapError, |
|
13 | 13 | }; |
|
14 | use std::collections::hash_map::Entry; | |
|
14 | use std::collections::hash_map::{self, Entry}; | |
|
15 | 15 | use std::collections::HashMap; |
|
16 | 16 | |
|
17 | // could be encapsulated if we care API stability more seriously | |
|
18 | pub type DirsMultisetIter<'a> = hash_map::Keys<'a, Vec<u8>, u32>; | |
|
19 | ||
|
17 | 20 | #[derive(PartialEq, Debug)] |
|
18 | 21 | pub struct DirsMultiset { |
|
19 | 22 | inner: HashMap<Vec<u8>, u32>, |
@@ -105,7 +108,7 b' impl DirsMultiset {' | |||
|
105 | 108 | self.inner.contains_key(key) |
|
106 | 109 | } |
|
107 | 110 | |
|
108 |
pub fn iter(&self) -> |
|
|
111 | pub fn iter(&self) -> DirsMultisetIter { | |
|
109 | 112 | self.inner.keys() |
|
110 | 113 | } |
|
111 | 114 |
@@ -9,7 +9,7 b' mod dirstate;' | |||
|
9 | 9 | pub mod discovery; |
|
10 | 10 | pub mod testing; // unconditionally built, for use from integration tests |
|
11 | 11 | pub use dirstate::{ |
|
12 | dirs_multiset::DirsMultiset, | |
|
12 | dirs_multiset::{DirsMultiset, DirsMultisetIter}, | |
|
13 | 13 | dirstate_map::DirstateMap, |
|
14 | 14 | parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE}, |
|
15 | 15 | CopyMap, DirstateEntry, DirstateParents, EntryState, StateMap, |
General Comments 0
You need to be logged in to leave comments.
Login now