cargo fmt
This commit is contained in:
parent
6d01857bd0
commit
0de8921306
2 changed files with 9 additions and 4 deletions
|
@ -22,7 +22,8 @@ pub struct Comment {
|
|||
}
|
||||
|
||||
fn serialize_gravatar<S>(email: &Option<String>, s: S) -> Result<S::Ok, S::Error>
|
||||
where S: Serializer,
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
match email {
|
||||
Some(email) => s.serialize_some(&format!("{:x}", md5::compute(email.to_lowercase()))),
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue