Skip to content

Commit c8c383c

Browse files
authored
base64ct: cargo fmt (#1789)
1 parent 7ccdb0d commit c8c383c

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

base64ct/src/decoder.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
//! Buffered Base64 decoder.
22
33
use crate::{
4+
encoding,
5+
line_ending::{CHAR_CR, CHAR_LF},
46
Encoding,
57
Error::{self, InvalidLength},
6-
MIN_LINE_WIDTH, encoding,
7-
line_ending::{CHAR_CR, CHAR_LF},
8+
MIN_LINE_WIDTH,
89
};
910
use core::{cmp, marker::PhantomData};
1011

@@ -544,7 +545,7 @@ impl<'i> Iterator for LineReader<'i> {
544545
#[cfg(test)]
545546
#[allow(clippy::unwrap_used)]
546547
mod tests {
547-
use crate::{Base64, Base64Unpadded, Decoder, alphabet::Alphabet, test_vectors::*};
548+
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Decoder};
548549

549550
#[cfg(feature = "std")]
550551
use {alloc::vec::Vec, std::io::Read};

base64ct/src/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ impl LineWrapper {
306306
#[cfg(test)]
307307
#[allow(clippy::unwrap_used)]
308308
mod tests {
309-
use crate::{Base64, Base64Unpadded, Encoder, LineEnding, alphabet::Alphabet, test_vectors::*};
309+
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Encoder, LineEnding};
310310

311311
#[test]
312312
fn encode_padded() {

base64ct/src/test_vectors.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ pub(crate) const UNPADDED_BIN: &[u8] = &[
2020
];
2121

2222
/// Padded multi-line Base64 example (from the `ssh-key` crate's `id_ed25519`)
23-
pub(crate) const MULTILINE_PADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
23+
pub(crate) const MULTILINE_PADDED_BASE64: &str =
24+
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
2425
QyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYgAAAJgAIAxdACAM\n\
2526
XQAAAAtzc2gtZWQyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYg\n\
2627
AAAEC2BsIi0QwW2uFscKTUUXNHLsYX4FxlaSDSblbAj7WR7bM+rvN+ot98qgEN796jTiQf\n\
@@ -41,7 +42,8 @@ pub(crate) const MULTILINE_PADDED_BIN: &[u8] = &[
4142
];
4243

4344
/// Unpadded multi-line Base64 example (from the `ssh-key` crate's `id_ecdsa_p256`).
44-
pub(crate) const MULTILINE_UNPADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
45+
pub(crate) const MULTILINE_UNPADDED_BASE64: &str =
46+
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
4547
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR8H9hzDOU0V76NkkCY7DZIgw+Sqooj\n\
4648
Y6xlb91FIfpjE+UR8YkbTp5ar44ULQatFaZqQlfz8FHYTooOL5G6gHBHAAAAsB8RBhUfEQ\n\
4749
YVAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHwf2HMM5TRXvo2S\n\

0 commit comments

Comments
 (0)