From 0de89213062704f6fecc131a5e462029226f25dc Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Sun, 10 Jul 2022 14:25:03 -0700 Subject: [PATCH] cargo fmt --- src/comment.rs | 7 ++++--- src/main.rs | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/comment.rs b/src/comment.rs index 65404f9..a3de1a6 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -22,10 +22,11 @@ pub struct Comment { } fn serialize_gravatar(email: &Option, s: S) -> Result -where S: Serializer, +where + S: Serializer, { - match email { - Some(email) => s.serialize_some(&format!("{:x}", md5::compute(email.to_lowercase()))), + match email { + Some(email) => s.serialize_some(&format!("{:x}", md5::compute(email.to_lowercase()))), None => s.serialize_none(), } } diff --git a/src/main.rs b/src/main.rs index 2b8eb9f..381016d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,7 +63,11 @@ async fn main() -> Result<(), std::io::Error> { .service(get_comments) .service(post_comment) .app_data(state.clone()) - .wrap(if testing { Cors::permissive() } else { Cors::default() }) + .wrap(if testing { + Cors::permissive() + } else { + Cors::default() + }) }) .bind(("127.0.0.1", 8080))? .run()