History

[commitgraph] Rename CommitData -> Commit.

Conor Davis committed 6 years ago

Commit d8c20071 parent 7c405ab5 files · +18 −18Browse files

Showing the changes to git-commitgraph/src/graph (1 of 5 files). Show all

Unified · Split

git-commitgraph/src/graph/access.rs+4−4
@@ -1,15 +1,15 @@
11 use crate::graph::GraphPosition;
22 use crate::graph_file::{GraphFile, LexPosition};
3−use crate::{CommitData, Graph};
3+use crate::{Commit, Graph};
44 use git_object::borrowed;
55
66 impl Graph {
7− pub fn commit_at(&self, pos: GraphPosition) -> CommitData<'_> {
7+ pub fn commit_at(&self, pos: GraphPosition) -> Commit<'_> {
88 let r = self.lookup_by_pos(pos);
99 r.file.commit_at(r.lex_pos)
1010 }
1111
12− pub fn commit_by_id(&self, id: borrowed::Id<'_>) -> Option<CommitData<'_>> {
12+ pub fn commit_by_id(&self, id: borrowed::Id<'_>) -> Option<Commit<'_>> {
1313 let r = self.lookup_by_id(id)?;
1414 Some(r.file.commit_at(r.lex_pos))
1515 }
@@ -20,7 +20,7 @@ impl Graph { · 4 unmodified lines
2020 }
2121
2222 /// Iterate over commits in unsorted order.
23− pub fn iter_commits(&self) -> impl Iterator<Item = CommitData<'_>> {
23+ pub fn iter_commits(&self) -> impl Iterator<Item = Commit<'_>> {
2424 self.files.iter().flat_map(|file| file.iter_commits())
2525 }
2626