rust: apply more formatting fixes
authorYuya Nishihara <yuya@tcha.org>
Sat, 31 Aug 2019 14:12:38 +0900
changeset 42841 ce6797ef6eab
parent 42840 b1b984f9c01d
child 42842 2c74337e6483
rust: apply more formatting fixes My cargo fmt updated these lines and they look good.
rust/hg-core/src/ancestors.rs
rust/hg-core/src/dagops.rs
rust/hg-core/src/dirstate/dirs_multiset.rs
rust/hg-core/src/discovery.rs
rust/hg-core/src/filepatterns.rs
rust/hg-core/src/utils.rs
rust/hg-cpython/src/filepatterns.rs
--- a/rust/hg-core/src/ancestors.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/ancestors.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -784,5 +784,4 @@
         missing_ancestors.remove_ancestors_from(&mut revs).unwrap();
         assert!(!revs.contains(&problem_rev));
     }
-
 }
--- a/rust/hg-core/src/dagops.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/dagops.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -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 @@
         );
         Ok(())
     }
-
 }
--- a/rust/hg-core/src/dirstate/dirs_multiset.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/dirstate/dirs_multiset.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -316,5 +316,4 @@
         };
         assert_eq!(expected, new);
     }
-
 }
--- a/rust/hg-core/src/discovery.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/discovery.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -691,5 +691,4 @@
         assert_eq!(sample, vec![0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13]);
         Ok(())
     }
-
 }
--- a/rust/hg-core/src/filepatterns.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/filepatterns.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -38,7 +38,8 @@
     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,
--- a/rust/hg-core/src/utils.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-core/src/utils.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -20,8 +20,7 @@
 /// assert_eq!(
 ///     line,
 ///     b"I love writing tests!".to_vec()
-///);
-///
+/// );
 /// ```
 pub fn replace_slice<T>(buf: &mut [T], from: &[T], to: &[T])
 where
--- a/rust/hg-cpython/src/filepatterns.rs	Thu Aug 22 14:31:07 2019 +0200
+++ b/rust/hg-cpython/src/filepatterns.rs	Sat Aug 31 14:12:38 2019 +0900
@@ -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::{