Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeytimoshin committed Jan 21, 2025
1 parent b72175e commit f66123d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion program-libs/utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ pub mod account;
pub mod bigint;
pub mod fee;
pub mod hashchain;
pub mod offset;
pub mod prime;
pub mod pubkey;
pub mod rand;
pub mod offset;

#[derive(Debug, Error, PartialEq)]
pub enum UtilsError {
Expand Down
8 changes: 5 additions & 3 deletions program-libs/utils/src/offset/copy.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::{mem, ptr};

use light_bounded_vec::{BoundedVec, BoundedVecMetadata, CyclicBoundedVec, CyclicBoundedVecMetadata};
use light_bounded_vec::{
BoundedVec, BoundedVecMetadata, CyclicBoundedVec, CyclicBoundedVecMetadata,
};

/// Creates a copy of value of type `T` based on the provided `bytes` buffer.
///
Expand Down Expand Up @@ -92,11 +94,11 @@ where
mod test {
use std::slice;

use super::*;

use bytemuck::{Pod, Zeroable};
use memoffset::offset_of;

use super::*;

#[test]
fn test_value_at() {
#[derive(Clone, Copy, Pod, Zeroable)]
Expand Down
4 changes: 2 additions & 2 deletions program-libs/utils/src/offset/zero_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ pub fn write_at<T>(bytes: &mut [u8], data: &[u8], offset: &mut usize) {

#[cfg(test)]
mod test {
use super::*;

use bytemuck::{Pod, Zeroable};
use memoffset::offset_of;

use super::*;

#[test]
fn test_read_ptr_at() {
#[derive(Clone, Copy, Pod, Zeroable)]
Expand Down

0 comments on commit f66123d

Please sign in to comment.