]> git.lizzy.rs Git - rust.git/commitdiff
s/in_index/input_index/
authorNiko Matsakis <niko@alum.mit.edu>
Fri, 3 Feb 2017 11:09:47 +0000 (06:09 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 3 Feb 2017 11:09:47 +0000 (06:09 -0500)
src/librustc_incremental/persist/preds/compress/dag_id.rs
src/librustc_incremental/persist/preds/compress/mod.rs

index 5ebabc98fda94c1cc3d13294e040906c514bd29f..c79930bfae51349b4e5b25e9761a89d4954680cf 100644 (file)
@@ -7,11 +7,11 @@ pub struct DagId {
 }
 
 impl DagId {
-    pub fn from_in_index(n: NodeIndex) -> Self {
+    pub fn from_input_index(n: NodeIndex) -> Self {
         DagId { index: n.0 as u32 }
     }
 
-    pub fn as_in_index(&self) -> NodeIndex {
+    pub fn as_input_index(&self) -> NodeIndex {
         NodeIndex(self.index as usize)
     }
 }
index ecd6d72e22d503dca53b0223e5e9a73461e33dce..974a2221a4575bf6f35107c044a81c03492b97dc 100644 (file)
@@ -89,7 +89,7 @@ fn new(in_graph: &'q Graph<N, ()>, is_input: I, is_output: O) -> Self {
         // correspond to the indices from the input graph
         for i in 0..in_graph.len_nodes() {
             let k = unify.new_key(());
-            assert!(k == DagId::from_in_index(NodeIndex(i)));
+            assert!(k == DagId::from_input_index(NodeIndex(i)));
         }
 
         GraphReduce { in_graph, unify, is_input, is_output }
@@ -105,8 +105,8 @@ fn inputs(&self, in_node: NodeIndex) -> impl Iterator<Item = NodeIndex> + 'q {
     }
 
     fn mark_cycle(&mut self, in_node1: NodeIndex, in_node2: NodeIndex) {
-        let dag_id1 = DagId::from_in_index(in_node1);
-        let dag_id2 = DagId::from_in_index(in_node2);
+        let dag_id1 = DagId::from_input_index(in_node1);
+        let dag_id2 = DagId::from_input_index(in_node2);
         self.unify.union(dag_id1, dag_id2);
     }
 
@@ -114,8 +114,8 @@ fn mark_cycle(&mut self, in_node1: NodeIndex, in_node2: NodeIndex) {
     /// be a no-op unless `in_node` participates in a cycle, in which
     /// case a distinct node *may* be returned.
     fn cycle_head(&mut self, in_node: NodeIndex) -> NodeIndex {
-        let i = DagId::from_in_index(in_node);
-        self.unify.find(i).as_in_index()
+        let i = DagId::from_input_index(in_node);
+        self.unify.find(i).as_input_index()
     }
 
     #[cfg(test)]