Skip to content

Commit

Permalink
style: nightly formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
HatemMn committed Dec 2, 2024
1 parent 5a83afc commit a2bb2b4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions benches/benches.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::{collections::HashSet, time::Duration};

use cosmian_findex::{Findex, InMemory, IndexADT, MemoryADT, Op, Secret, WORD_LENGTH};
use cosmian_findex::{dummy_decode, dummy_encode};
use cosmian_findex::{
Findex, InMemory, IndexADT, MemoryADT, Op, Secret, WORD_LENGTH, dummy_decode, dummy_encode,
};
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
use futures::{executor::block_on, future::join_all};
use lazy_static::lazy_static;
Expand Down
3 changes: 1 addition & 2 deletions examples/insert.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::collections::HashSet;

use cosmian_findex::{Findex, InMemory, IndexADT, Secret, Value};
use cosmian_findex::{dummy_decode, dummy_encode};
use cosmian_findex::{Findex, InMemory, IndexADT, Secret, Value, dummy_decode, dummy_encode};
use futures::executor::block_on;
use rand_chacha::ChaChaRng;
use rand_core::{CryptoRngCore, SeedableRng};
Expand Down
3 changes: 1 addition & 2 deletions src/memory/in_memory_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use std::{
sync::{Arc, Mutex},
};

use crate::MemoryADT;

use super::error::MemoryError;
use crate::MemoryADT;

#[derive(Clone, Debug)]
pub struct InMemory<Address: Hash + Eq, Value> {
Expand Down
4 changes: 2 additions & 2 deletions src/memory/redis_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use std::{

use redis::{AsyncCommands, aio::ConnectionManager};

use crate::MemoryADT;

use super::error::MemoryError;
use crate::MemoryADT;

#[derive(Clone)]
pub struct RedisStore<Address: Hash + Eq, const WORD_LENGTH: usize> {
Expand Down Expand Up @@ -63,6 +62,7 @@ impl<Address: Hash + Eq, const WORD_LENGTH: usize> RedisStore<Address, WORD_LENG
_marker_adr: PhantomData,
})
}

/// Connects to a Redis server using the given URL.
pub async fn connect(url: &str) -> Result<Self, MemoryError> {
let client = redis::Client::open(url)?;
Expand Down
3 changes: 2 additions & 1 deletion src/test/memory.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// ! This module defines tests any implementation of the MemoryADT interface must pass.
// ! This module defines tests any implementation of the MemoryADT interface
// must pass.
#[cfg(feature = "test-utils")]
use rand::{Rng, SeedableRng, rngs::StdRng};

Expand Down

0 comments on commit a2bb2b4

Please sign in to comment.