Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jtriley-eth committed Nov 25, 2024
1 parent a2d48a2 commit f6b15f8
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/lib.nr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod utils;

pub use utils::{conditional_select, lt_f, DebugRandomEngine};
pub use utils::{conditional_select, DebugRandomEngine, lt_f};

use std::collections::bounded_vec::BoundedVec;

Expand Down Expand Up @@ -206,13 +206,10 @@ impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32>
}
}

impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32> From<BoundedVec<u8, MaxBytes>> for SubString<MaxPaddedBytes, PaddedChunksMinusOne, MaxBytes> {
impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32> From<BoundedVec<u8, MaxBytes>> for SubString<MaxPaddedBytes, PaddedChunksMinusOne, MaxBytes> {
fn from(input: BoundedVec<u8, MaxBytes>) -> Self {
Self::new(
input.storage(),
input.len() as u32
)
}
Self::new(input.storage(), input.len() as u32)
}
}

// ######################################################
Expand Down Expand Up @@ -420,13 +417,10 @@ impl<let MaxPaddedBytes: u32, let PaddedChunks: u32, let MaxBytes: u32> StringBo
}
}

impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32> From<BoundedVec<u8, MaxBytes>> for StringBody<MaxPaddedBytes, PaddedChunksMinusOne, MaxBytes> {
impl<let MaxPaddedBytes: u32, let PaddedChunksMinusOne: u32, let MaxBytes: u32> From<BoundedVec<u8, MaxBytes>> for StringBody<MaxPaddedBytes, PaddedChunksMinusOne, MaxBytes> {
fn from(input: BoundedVec<u8, MaxBytes>) -> Self {
Self::new(
input.storage(),
input.len() as u32
)
}
Self::new(input.storage(), input.len() as u32)
}
}

/// Given an input byte array, convert into 31-byte chunks
Expand Down

0 comments on commit f6b15f8

Please sign in to comment.