Skip to content

Commit

Permalink
style: Update rustfmt.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
sorairolake committed Sep 28, 2024
1 parent 1a6db7d commit d5c1917
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions crates/scryptenc/benches/decrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

extern crate test;

use test::Bencher;

use scryptenc::Decryptor;
use test::Bencher;

const PASSPHRASE: &str = "passphrase";
// Generated using `scrypt` version 1.3.1.
Expand Down
3 changes: 1 addition & 2 deletions crates/scryptenc/benches/encrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

extern crate test;

use test::Bencher;

use scryptenc::{scrypt::Params, Encryptor};
use test::Bencher;

const PASSPHRASE: &str = "passphrase";
const TEST_DATA: &[u8] = include_bytes!("../tests/data/data.txt");
Expand Down
3 changes: 1 addition & 2 deletions crates/scryptenc/benches/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

extern crate test;

use test::Bencher;

use scryptenc::Params;
use test::Bencher;

// Generated using `scrypt` version 1.3.1.
const TEST_DATA_ENC: &[u8] = include_bytes!("../tests/data/data.txt.scrypt");
Expand Down
5 changes: 2 additions & 3 deletions crates/scryptenc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,14 @@ mod error;
mod format;
mod params;

pub use hmac;
pub use scrypt;

use aes::Aes256;
use ctr::Ctr128BE;
pub use hmac;
use hmac::{
digest::{generic_array::GenericArray, typenum::U32, Output},
Hmac,
};
pub use scrypt;
use sha2::Sha256;

#[cfg(feature = "alloc")]
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ default: build

# Run the formatter with options
@fmt-with-options:
cargo fmt --all -- --config "format_code_in_doc_comments=true,wrap_comments=true"
cargo +nightly fmt --all

# Run the linter
@clippy:
Expand Down
4 changes: 4 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

edition = "2021"
format_code_in_doc_comments = true
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
wrap_comments = true

0 comments on commit d5c1917

Please sign in to comment.