History

Remove re-export of git_object::borrowed::Id (#63)

Sebastian Thiel committed 5 years ago

Commit a3f28161 parent fdbe70422 files · +64 −69Browse files

Showing the changes to git-commitgraph/src/file/commit.rs (1 of 22 files). Show all

Unified · Split

git-commitgraph/src/file/commit.rs+5−5
@@ -5,7 +5,7 @@ use crate::{ · 4 unmodified lines
55 };
66 use byteorder::{BigEndian, ByteOrder};
77 use git_hash::SIZE_OF_SHA1_DIGEST as SHA1_SIZE;
8−use git_object::{borrowed, owned};
8+use git_object::owned;
99 use std::{
1010 convert::{TryFrom, TryInto},
1111 fmt::{Debug, Formatter},
@@ -40,7 +40,7 @@ pub struct Commit<'a> { · 28 unmodified lines
4040 generation: u32,
4141 parent1: ParentEdge,
4242 parent2: ParentEdge,
43− root_tree_id: borrowed::Id<'a>,
43+ root_tree_id: git_hash::borrowed::Id<'a>,
4444 }
4545
4646 impl<'a> Commit<'a> {
@@ -49,7 +49,7 @@ impl<'a> Commit<'a> { · 2 unmodified lines
4949 Commit {
5050 file,
5151 pos,
52− root_tree_id: borrowed::Id::try_from(&bytes[..SHA1_SIZE]).expect("20 bytes SHA1 to be alright"),
52+ root_tree_id: git_hash::borrowed::Id::try_from(&bytes[..SHA1_SIZE]).expect("20 bytes SHA1 to be alright"),
5353 parent1: ParentEdge::from_raw(BigEndian::read_u32(&bytes[SHA1_SIZE..SHA1_SIZE + 4])),
5454 parent2: ParentEdge::from_raw(BigEndian::read_u32(&bytes[SHA1_SIZE + 4..SHA1_SIZE + 8])),
5555 generation: BigEndian::read_u32(&bytes[SHA1_SIZE + 8..SHA1_SIZE + 12]) >> 2,
@@ -84,7 +84,7 @@ impl<'a> Commit<'a> { · 28 unmodified lines
8484 }
8585
8686 /// Returns the hash of this commit.
87− pub fn id(&self) -> borrowed::Id<'a> {
87+ pub fn id(&self) -> git_hash::borrowed::Id<'a> {
8888 self.file.id_at(self.pos)
8989 }
9090
@@ -99,7 +99,7 @@ impl<'a> Commit<'a> { · 8 unmodified lines
9999 }
100100
101101 /// Return the hash of the tree this commit points to.
102− pub fn root_tree_id(&self) -> borrowed::Id<'a> {
102+ pub fn root_tree_id(&self) -> git_hash::borrowed::Id<'a> {
103103 self.root_tree_id
104104 }
105105 }