comparison rust/hg-core/src/dagops.rs @ 42841:ce6797ef6eab

rust: apply more formatting fixes My cargo fmt updated these lines and they look good.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 31 Aug 2019 14:12:38 +0900
parents be0733552984
children 26114bd6ec60
comparison
equal deleted inserted replaced
42840:b1b984f9c01d 42841:ce6797ef6eab
6 // GNU General Public License version 2 or any later version. 6 // GNU General Public License version 2 or any later version.
7 7
8 //! Miscellaneous DAG operations 8 //! Miscellaneous DAG operations
9 //! 9 //!
10 //! # Terminology 10 //! # Terminology
11 //! - By *relative heads* of a collection of revision numbers (`Revision`), 11 //! - By *relative heads* of a collection of revision numbers (`Revision`), we
12 //! we mean those revisions that have no children among the collection. 12 //! mean those revisions that have no children among the collection.
13 //! - Similarly *relative roots* of a collection of `Revision`, we mean 13 //! - Similarly *relative roots* of a collection of `Revision`, we mean those
14 //! those whose parents, if any, don't belong to the collection. 14 //! whose parents, if any, don't belong to the collection.
15 use super::{Graph, GraphError, Revision, NULL_REVISION}; 15 use super::{Graph, GraphError, Revision, NULL_REVISION};
16 use crate::ancestors::AncestorsIterator; 16 use crate::ancestors::AncestorsIterator;
17 use std::collections::{BTreeSet, HashSet}; 17 use std::collections::{BTreeSet, HashSet};
18 18
19 fn remove_parents( 19 fn remove_parents(
270 range_vec(SampleGraph, &[5, 6], &[10, 12])?, 270 range_vec(SampleGraph, &[5, 6], &[10, 12])?,
271 vec![5, 6, 9, 10, 12] 271 vec![5, 6, 9, 10, 12]
272 ); 272 );
273 Ok(()) 273 Ok(())
274 } 274 }
275 275 }
276 }