Skip to content

Commit

Permalink
base64: marke base64 helpers as #[allow(unused)]
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed May 22, 2024
1 parent 784fba7 commit c3fe757
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/types/crypto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ const fn base64_encoded_length(len: usize) -> usize {

macro_rules! impl_base64_helper {
($base:ident, $display:ident, $fromstr:ident, $test_module:ident, $array_length:literal) => {
#[allow(unused)]
struct $base;

impl $base {
const LENGTH: usize = $array_length;
#[allow(unused)]
const ENCODED_LENGTH: usize = base64_encoded_length(Self::LENGTH);
}

#[allow(unused)]
struct $display<'a>(&'a [u8; $base::LENGTH]);

impl<'a> std::fmt::Display for $display<'a> {
Expand All @@ -58,6 +61,7 @@ macro_rules! impl_base64_helper {
}
}

#[allow(unused)]
#[derive(Debug, PartialEq)]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
struct $fromstr([u8; $base::LENGTH]);
Expand Down

0 comments on commit c3fe757

Please sign in to comment.