Fix clippy warnings

This commit is contained in:
Billy Chan 2021-11-08 12:53:12 +08:00
parent 666a5bb068
commit cb996d8460
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7

View File

@ -21,11 +21,11 @@ where
T: DeserializeOwned, T: DeserializeOwned,
{ {
cookies.get(FLASH_COOKIE_NAME).and_then(|flash_cookie| { cookies.get(FLASH_COOKIE_NAME).and_then(|flash_cookie| {
(if let Ok(ValuedMessage::<T> { value }) = serde_json::from_str(flash_cookie.value()) { if let Ok(ValuedMessage::<T> { value }) = serde_json::from_str(flash_cookie.value()) {
Some(value) Some(value)
} else { } else {
None None
}) }
}) })
} }