Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Made AuthorituId::from_slice private
  • Loading branch information
arkpar committed Jul 3, 2018
commit 5f8bbff7b8eb7cc9a5cf70e09e069a0c802aa8af
4 changes: 2 additions & 2 deletions substrate/primitives/src/authority_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ use H256;
pub struct AuthorityId(pub [u8; 32]);

impl AuthorityId {
/// Create an id from byte slice.
pub fn from_slice(data: &[u8]) -> Self {
/// Create an id from a 32-byte slice. Panics with other lengths.
fn from_slice(data: &[u8]) -> Self {
let mut r = [0u8; 32];
r.copy_from_slice(data);
AuthorityId(r)
Expand Down