diff --git a/src/tar_format_types.rs b/src/tar_format_types.rs index 21bdf30..e58b8a5 100644 --- a/src/tar_format_types.rs +++ b/src/tar_format_types.rs @@ -22,7 +22,7 @@ pub struct TarFormatString { /// This string will be null terminated if it doesn't fill the entire array. impl TarFormatString { /// 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"); }