Commit ca36d627 authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'fix-indentation'

f1e62019

 hooks: fix indentation
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King's avatarBrad King <brad.king@kitware.com>
Merge-request: !26
parents 605962d8 f1e62019
......@@ -29,14 +29,14 @@ 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") {
from_value(val)
.map(GitlabHook::Web)
} else if let Some(_) = val.pointer("/event_name") {
from_value(val)
.map(GitlabHook::System)
} else {
return Err(D::Error::missing_field("either object_kind or event_name"));
};
from_value(val)
.map(GitlabHook::Web)
} else if let Some(_) = val.pointer("/event_name") {
from_value(val)
.map(GitlabHook::System)
} else {
return Err(D::Error::missing_field("either object_kind or event_name"));
};
hook_res.map_err(|err| {
D::Error::invalid_value(&format!("{:?}", err))
......
Supports Markdown
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