cargo fmt
This commit is contained in:
parent
aad990ab71
commit
b810ab2e90
|
@ -45,7 +45,6 @@ pub trait PrivateKey: Sized {
|
|||
fn requires_hardened_derivation() -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// Errors associated with creating and arithmetic on private keys. This specific error is only
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use crate::{extended_key::private_key::Error as XPrvError, DerivationPath, ExtendedPrivateKey, PrivateKey};
|
||||
use crate::{
|
||||
extended_key::private_key::Error as XPrvError, DerivationPath, ExtendedPrivateKey, PrivateKey,
|
||||
};
|
||||
use keyfork_mnemonic_util::Mnemonic;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ impl Mnemonic {
|
|||
}
|
||||
num
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
|
|
@ -73,9 +73,7 @@ where
|
|||
let request: Request = match deserialize(&req) {
|
||||
Ok(r) => r,
|
||||
Err(e) => {
|
||||
return Box::pin(
|
||||
async move { Err(BincodeServiceError::Convert(e.to_string())) },
|
||||
)
|
||||
return Box::pin(async move { Err(BincodeServiceError::Convert(e.to_string())) })
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -112,7 +110,10 @@ mod tests {
|
|||
type Error = Infallible;
|
||||
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
|
||||
|
||||
fn poll_ready(&mut self, _cx: &mut std::task::Context<'_>) -> std::task::Poll<Result<(), Self::Error>> {
|
||||
fn poll_ready(
|
||||
&mut self,
|
||||
_cx: &mut std::task::Context<'_>,
|
||||
) -> std::task::Poll<Result<(), Self::Error>> {
|
||||
Poll::Ready(Ok(()))
|
||||
}
|
||||
|
||||
|
@ -123,11 +124,20 @@ mod tests {
|
|||
|
||||
#[tokio::test]
|
||||
async fn can_serde_responses() {
|
||||
let content = serialize(&Test { field: "hello world!".to_string() }).unwrap();
|
||||
let content = serialize(&Test {
|
||||
field: "hello world!".to_string(),
|
||||
})
|
||||
.unwrap();
|
||||
let mut service = ServiceBuilder::new()
|
||||
.layer(BincodeLayer::<Test>::new())
|
||||
.service(App);
|
||||
let result = service.ready().await.unwrap().call(content.clone()).await.unwrap();
|
||||
let result = service
|
||||
.ready()
|
||||
.await
|
||||
.unwrap()
|
||||
.call(content.clone())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(result, content);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue