Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
phip1611 committed May 3, 2024
1 parent fadf8ab commit b944597
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tar_format_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct TarFormatString<const N: usize> {
/// This string will be null terminated if it doesn't fill the entire array.
impl<const N: usize> TarFormatString<N> {
/// Constructor.
pub fn new(bytes: [u8; N]) -> Self {
pub const fn new(bytes: [u8; N]) -> Self {
if N == 0 {
panic!("Array cannot be zero length");
}
Expand Down

0 comments on commit b944597

Please sign in to comment.