Commit 43f8c8ec authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clippy: apply suggestions

parent 8837cf1c
......@@ -28,9 +28,9 @@ impl Deserialize for GitlabHook {
// Look for `object_kind` first because some web hooks also have `event_name` which would
// cause a false match here.
let hook_res = if let Some(_) = val.pointer("/object_kind") {
let hook_res = if val.pointer("/object_kind").is_some() {
from_value(val).map(GitlabHook::Web)
} else if let Some(_) = val.pointer("/event_name") {
} else if val.pointer("/event_name").is_some() {
from_value(val).map(GitlabHook::System)
} else {
return Err(D::Error::missing_field("either object_kind or event_name"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment