History

change!: remove `ObjectId::from_20_bytes()` from public API (#279)

Use `ObjectId::from()` or `ObjectId::try_from()` instead.

Sebastian Thiel committed 4 years ago

Commit 2a799e61 parent e6ff1a81 file · +1 −1Browse files

Unified · Split

git-hash/src/owned.rs+1−1
@@ -85,7 +85,7 @@ impl ObjectId { · 84 unmodified lines
8585 ///
8686 /// Panics of the slice doesn't have a length of 20.
8787 #[inline]
88− pub fn from_20_bytes(b: &[u8]) -> ObjectId {
88+ pub(crate) fn from_20_bytes(b: &[u8]) -> ObjectId {
8989 let mut id = [0; SIZE_OF_SHA1_DIGEST];
9090 id.copy_from_slice(b);
9191 ObjectId::Sha1(id)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t