[PATCH] rust: apply more formatting fixes

Yuya Nishihara yuya at tcha.org
Sat Aug 31 06:04:03 UTC 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1567228358 -32400
#      Sat Aug 31 14:12:38 2019 +0900
# Node ID 72263c4cadfe715c76c35f6966e35e8dd3934e96
# Parent  a3c2ffcd266f33608ac1694ed7daece0bd85d52b
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<T>(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::{


More information about the Mercurial-devel mailing list