Skip to content

Commit 41c40ad

Browse files
committed
refactor
1 parent 7fca001 commit 41c40ad

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

gix-hash/src/kind.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ impl Kind {
114114
}
115115
}
116116

117-
/// Create an owned empty-blob id of our hash kind.
117+
/// The hash of an empty blob.
118118
#[inline]
119119
pub const fn empty_blob(&self) -> ObjectId {
120120
ObjectId::empty_blob(*self)
121121
}
122122

123-
/// Create an owned empty-tree id of our hash kind.
123+
/// The hash of an empty tree.
124124
#[inline]
125125
pub const fn empty_tree(&self) -> ObjectId {
126126
ObjectId::empty_tree(*self)

gix-hash/tests/hash/kind.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use gix_hash::{Kind, ObjectId};
2+
13
mod from_hex_len {
24
use gix_hash::Kind;
35

@@ -15,18 +17,14 @@ mod from_hex_len {
1517
}
1618
}
1719

18-
mod empty_objects {
19-
use gix_hash::{Kind, ObjectId};
20-
21-
#[test]
22-
fn empty_blob() {
23-
let kind = Kind::Sha1;
24-
assert_eq!(kind.empty_blob(), ObjectId::empty_blob(kind));
25-
}
20+
#[test]
21+
fn empty_blob() {
22+
let sha1 = Kind::Sha1;
23+
assert_eq!(sha1.empty_blob(), ObjectId::empty_blob(sha1));
24+
}
2625

27-
#[test]
28-
fn empty_tree() {
29-
let kind = Kind::Sha1;
30-
assert_eq!(kind.empty_tree(), ObjectId::empty_tree(kind));
31-
}
26+
#[test]
27+
fn empty_tree() {
28+
let sha1 = Kind::Sha1;
29+
assert_eq!(sha1.empty_tree(), ObjectId::empty_tree(sha1));
3230
}

0 commit comments

Comments
 (0)