mirror of
https://github.com/actix/examples
synced 2024-11-23 14:31:07 +01:00
clippy
This commit is contained in:
parent
4df66d1e8a
commit
43d26f194d
@ -50,7 +50,7 @@ pub fn send_invitation(invitation: &Invitation) -> Result<(), ServiceError> {
|
|||||||
match result {
|
match result {
|
||||||
Ok(res) => match res {
|
Ok(res) => match res {
|
||||||
TransmissionResponse::ApiResponse(api_res) => {
|
TransmissionResponse::ApiResponse(api_res) => {
|
||||||
println!("API Response: \n {:#?}", api_res);
|
println!("API Response: \n {api_res:#?}");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
TransmissionResponse::ApiError(errors) => {
|
TransmissionResponse::ApiError(errors) => {
|
||||||
@ -59,7 +59,7 @@ pub fn send_invitation(invitation: &Invitation) -> Result<(), ServiceError> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
println!("Send Email Error: \n {:#?}", error);
|
println!("Send Email Error: \n {error:#?}");
|
||||||
Err(ServiceError::InternalServerError)
|
Err(ServiceError::InternalServerError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ pub enum ServiceError {
|
|||||||
#[display(fmt = "Internal Server Error")]
|
#[display(fmt = "Internal Server Error")]
|
||||||
InternalServerError,
|
InternalServerError,
|
||||||
|
|
||||||
#[display(fmt = "BadRequest: {}", _0)]
|
#[display(fmt = "BadRequest: {_0}")]
|
||||||
BadRequest(String),
|
BadRequest(String),
|
||||||
|
|
||||||
#[display(fmt = "Unauthorized")]
|
#[display(fmt = "Unauthorized")]
|
||||||
|
@ -59,6 +59,7 @@ impl StopHandle {
|
|||||||
|
|
||||||
/// Sends stop signal through contained server handle.
|
/// Sends stop signal through contained server handle.
|
||||||
pub(crate) fn stop(&self, graceful: bool) {
|
pub(crate) fn stop(&self, graceful: bool) {
|
||||||
|
#[allow(clippy::let_underscore_future)]
|
||||||
let _ = self.inner.lock().as_ref().unwrap().stop(graceful);
|
let _ = self.inner.lock().as_ref().unwrap().stop(graceful);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user