# HG changeset patch # User Yuya Nishihara # Date 2019-08-31 05:12:38 # Node ID ce6797ef6eab33f0255b940ff6b628215762a84b # Parent b1b984f9c01d8cc60747cc74f7b5a1b27fa53f87 rust: apply more formatting fixes My cargo fmt updated these lines and they look good. diff --git a/rust/hg-core/src/ancestors.rs b/rust/hg-core/src/ancestors.rs --- a/rust/hg-core/src/ancestors.rs +++ b/rust/hg-core/src/ancestors.rs @@ -784,5 +784,4 @@ mod tests { missing_ancestors.remove_ancestors_from(&mut revs).unwrap(); assert!(!revs.contains(&problem_rev)); } - } diff --git a/rust/hg-core/src/dagops.rs b/rust/hg-core/src/dagops.rs --- a/rust/hg-core/src/dagops.rs +++ b/rust/hg-core/src/dagops.rs @@ -8,10 +8,10 @@ //! Miscellaneous DAG operations //! //! # Terminology -//! - By *relative heads* of a collection of revision numbers (`Revision`), -//! we mean those revisions that have no children among the collection. -//! - Similarly *relative roots* of a collection of `Revision`, we mean -//! those whose parents, if any, don't belong to the collection. +//! - By *relative heads* of a collection of revision numbers (`Revision`), we +//! mean those revisions that have no children among the collection. +//! - Similarly *relative roots* of a collection of `Revision`, we mean those +//! whose parents, if any, don't belong to the collection. use super::{Graph, GraphError, Revision, NULL_REVISION}; use crate::ancestors::AncestorsIterator; use std::collections::{BTreeSet, HashSet}; @@ -272,5 +272,4 @@ mod tests { ); Ok(()) } - } diff --git a/rust/hg-core/src/dirstate/dirs_multiset.rs b/rust/hg-core/src/dirstate/dirs_multiset.rs --- a/rust/hg-core/src/dirstate/dirs_multiset.rs +++ b/rust/hg-core/src/dirstate/dirs_multiset.rs @@ -316,5 +316,4 @@ mod tests { }; assert_eq!(expected, new); } - } diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs --- a/rust/hg-core/src/discovery.rs +++ b/rust/hg-core/src/discovery.rs @@ -691,5 +691,4 @@ mod tests { assert_eq!(sample, vec![0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13]); Ok(()) } - } diff --git a/rust/hg-core/src/filepatterns.rs b/rust/hg-core/src/filepatterns.rs --- a/rust/hg-core/src/filepatterns.rs +++ b/rust/hg-core/src/filepatterns.rs @@ -38,7 +38,8 @@ pub enum PatternSyntax { Regexp, /// Glob that matches at the front of the path RootGlob, - /// Glob that matches at any suffix of the path (still anchored at slashes) + /// Glob that matches at any suffix of the path (still anchored at + /// slashes) Glob, Path, RelPath, diff --git a/rust/hg-core/src/utils.rs b/rust/hg-core/src/utils.rs --- a/rust/hg-core/src/utils.rs +++ b/rust/hg-core/src/utils.rs @@ -20,8 +20,7 @@ pub mod files; /// assert_eq!( /// line, /// b"I love writing tests!".to_vec() -///); -/// +/// ); /// ``` pub fn replace_slice(buf: &mut [T], from: &[T], to: &[T]) where diff --git a/rust/hg-cpython/src/filepatterns.rs b/rust/hg-cpython/src/filepatterns.rs --- a/rust/hg-cpython/src/filepatterns.rs +++ b/rust/hg-cpython/src/filepatterns.rs @@ -8,7 +8,8 @@ //! Bindings for the `hg::filepatterns` module provided by the //! `hg-core` crate. From Python, this will be seen as `rustext.filepatterns` -//! and can be used as replacement for the the pure `filepatterns` Python module. +//! and can be used as replacement for the the pure `filepatterns` Python +//! module. //! use crate::exceptions::{PatternError, PatternFileError}; use cpython::{