diff rust/hg-core/src/revlog/revlog.rs @ 47969:87e3f878e65f

rust: Rename get_node methods to data_for_node, get_rev to data_for_rev These are respective methods of Changelog, Manifestlog, and Filelog; three Rust structs that that wrap a Revlog struct. This rename clarifies that node IDs or revision numbers are parameters, not return values. Also reword doc-comments in Manifestlog and Filelog to separate node IDs and revision numbers that are local to a given (non-changelog) revlog from those of a changeset. Differential Revision: https://phab.mercurial-scm.org/D11416
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 14 Sep 2021 18:25:51 +0200
parents 6f579618ea7b
children fecfea658127
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/revlog.rs	Tue Sep 14 18:10:35 2021 +0200
+++ b/rust/hg-core/src/revlog/revlog.rs	Tue Sep 14 18:25:51 2021 +0200
@@ -119,12 +119,14 @@
         self.index.is_empty()
     }
 
-    /// Returns the node ID for the given revision number, if it exists in this revlog
+    /// Returns the node ID for the given revision number, if it exists in this
+    /// revlog
     pub fn node_from_rev(&self, rev: Revision) -> Option<&Node> {
         Some(self.index.get_entry(rev)?.hash())
     }
 
-    /// Return the revision number for the given node ID, if it exists in this revlog
+    /// Return the revision number for the given node ID, if it exists in this
+    /// revlog
     #[timed]
     pub fn rev_from_node(
         &self,