Skip to content

Commit a12efc4

Browse files
committed
rustfmt
1 parent 58a7856 commit a12efc4

File tree

2 files changed

+12
-11
lines changed
  • postgres-protocol/src/authentication
  • postgres-types/src

2 files changed

+12
-11
lines changed

postgres-protocol/src/authentication/sasl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
33
use hmac::{Hmac, Mac, NewMac};
44
use rand::{self, Rng};
5-
use sha2::{Digest, Sha256};
65
use sha2::digest::FixedOutput;
6+
use sha2::{Digest, Sha256};
77
use std::fmt::Write;
88
use std::io;
99
use std::iter;
@@ -271,8 +271,8 @@ impl ScramSha256 {
271271
hmac.update(b"Server Key");
272272
let server_key = hmac.finalize().into_bytes();
273273

274-
let mut hmac = Hmac::<Sha256>::new_varkey(&server_key)
275-
.expect("HMAC is able to accept all key sizes");
274+
let mut hmac =
275+
Hmac::<Sha256>::new_varkey(&server_key).expect("HMAC is able to accept all key sizes");
276276
hmac.update(auth_message.as_bytes());
277277
hmac.verify(&verifier)
278278
.map_err(|_| io::Error::new(io::ErrorKind::InvalidInput, "SCRAM verification error"))

postgres-types/src/lib.rs

+9-8
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,17 @@ macro_rules! accepts {
158158
#[macro_export]
159159
macro_rules! to_sql_checked {
160160
() => {
161-
fn to_sql_checked(&self,
162-
ty: &$crate::Type,
163-
out: &mut $crate::private::BytesMut)
164-
-> ::std::result::Result<$crate::IsNull,
165-
Box<dyn ::std::error::Error +
166-
::std::marker::Sync +
167-
::std::marker::Send>> {
161+
fn to_sql_checked(
162+
&self,
163+
ty: &$crate::Type,
164+
out: &mut $crate::private::BytesMut,
165+
) -> ::std::result::Result<
166+
$crate::IsNull,
167+
Box<dyn ::std::error::Error + ::std::marker::Sync + ::std::marker::Send>,
168+
> {
168169
$crate::__to_sql_checked(self, ty, out)
169170
}
170-
}
171+
};
171172
}
172173

173174
// WARNING: this function is not considered part of this crate's public API.

0 commit comments

Comments
 (0)