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

Merge topic 'rustfmt'

b994bc05 rustfmt: fix some TODO items rustfmt points out
d0a6ed57 webhooks: reorganize some comments to make rustfmt happy
6c7c2ffe rustfmt: apply suggestions
eaaf5ad8 rustfmt: fix copyright header comments
a057af41

 rustfmt: update configuration
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: Brad King's avatarBrad King <brad.king@kitware.com>
Merge-request: !143
parents 8b189531 b994bc05
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
force_multiline_blocks = true
license_template_path = ".license.template"
match_block_trailing_comma = true
report_fixme = "Unnumbered"
report_todo = "Unnumbered"
struct_lit_single_line = false
enum_trailing_comma = true
fn_args_density = "Compressed"
fn_args_layout = "Visual"
match_block_trailing_comma = true
match_wildcard_trailing_comma = true
reorder_imported_names = true
struct_lit_multiline_style = "ForceMulti"
struct_lit_trailing_comma = "Always"
struct_trailing_comma = "Always"
where_trailing_comma = true
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......@@ -42,7 +40,8 @@ error_chain! {
impl Error {
/// Extract the message from a Gitlab JSON error.
pub fn from_gitlab(value: Value) -> Self {
let msg = value.pointer("/message")
let msg = value
.pointer("/message")
.and_then(|s| s.as_str())
.unwrap_or_else(|| "unknown error");
......
This diff is collapsed.
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......@@ -13,8 +11,8 @@
//! Gitlab does not have consistent structures for its hooks, so they often change from
//! version to version.
use crates::serde::{Deserialize, Deserializer};
use crates::serde::de::{Error, Unexpected};
use crates::serde::{Deserialize, Deserializer};
use crates::serde_json::{self, Value};
use systemhooks::SystemHook;
......@@ -31,7 +29,8 @@ pub enum GitlabHook {
impl<'de> Deserialize<'de> for GitlabHook {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,
where
D: Deserializer<'de>,
{
let val = <Value as Deserialize>::deserialize(deserializer)?;
......@@ -46,8 +45,10 @@ impl<'de> Deserialize<'de> for GitlabHook {
};
hook_res.map_err(|err| {
D::Error::invalid_value(Unexpected::Other("gitlab hook"),
&format!("{:?}", err).as_str())
D::Error::invalid_value(
Unexpected::Other("gitlab hook"),
&format!("{:?}", err).as_str(),
)
})
}
}
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......@@ -38,16 +36,16 @@ mod error;
mod macros;
mod gitlab;
pub mod hooks;
pub mod systemhooks;
pub mod types;
pub mod webhooks;
pub mod hooks;
pub use error::*;
pub use gitlab::CommitStatusInfo;
pub use gitlab::MergeRequestStateFilter;
pub use gitlab::Gitlab;
pub use gitlab::GitlabBuilder;
pub use gitlab::MergeRequestStateFilter;
pub use types::*;
#[cfg(test)]
......
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......@@ -15,8 +13,8 @@
//! version to version.
use crates::chrono::{DateTime, Utc};
use crates::serde::{Deserialize, Deserializer, Serialize, Serializer};
use crates::serde::de::{Error, Unexpected};
use crates::serde::{Deserialize, Deserializer, Serialize, Serializer};
use crates::serde_json::{self, Value};
use types::{AccessLevel, GroupId, ObjectId, ProjectId, SshKeyId, UserId};
......@@ -57,7 +55,7 @@ enum_serialize!(ProjectVisibility -> "project visibility",
Public => "public" ; "visibilitylevel|public",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A hook for a project.
pub struct ProjectSystemHook {
......@@ -133,7 +131,7 @@ impl From<HumanAccessLevel> for AccessLevel {
}
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A project membership hook.
pub struct ProjectMemberSystemHook {
......@@ -178,7 +176,7 @@ enum_serialize!(UserEvent -> "user event",
Destroy => "user_destroy",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A user hook.
pub struct UserSystemHook {
......@@ -211,7 +209,7 @@ enum_serialize!(KeyEvent -> "key event",
Destroy => "key_destroy",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// An SSH key hook.
pub struct KeySystemHook {
......@@ -242,7 +240,7 @@ enum_serialize!(GroupEvent -> "group event",
Destroy => "group_destroy",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A group hook.
pub struct GroupSystemHook {
......@@ -277,7 +275,7 @@ enum_serialize!(GroupMemberEvent -> "group member event",
Remove => "user_remove_from_group",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A group membership hook.
pub struct GroupMemberSystemHook {
......@@ -318,7 +316,7 @@ enum_serialize!(PushEvent -> "push event",
TagPush => "tag_push",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A push hook.
pub struct PushSystemHook {
......@@ -334,7 +332,7 @@ pub struct PushSystemHook {
pub before: ObjectId,
/// The new object ID of the ref that was pushed.
pub after: ObjectId,
#[serde(rename="ref")]
#[serde(rename = "ref")]
/// The name of the reference that was pushed.
pub ref_: String,
/// The new object ID of the ref that was pushed.
......@@ -383,14 +381,18 @@ pub enum SystemHook {
impl<'de> Deserialize<'de> for SystemHook {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,
where
D: Deserializer<'de>,
{
let val = <Value as Deserialize>::deserialize(deserializer)?;
let event_name = match val.pointer("/event_name") {
Some(&Value::String(ref name)) => name.to_string(),
Some(_) => {
return Err(D::Error::invalid_type(Unexpected::Other("JSON value"), &"a string"));
return Err(D::Error::invalid_type(
Unexpected::Other("JSON value"),
&"a string",
));
},
None => {
return Err(D::Error::missing_field("event_name"));
......@@ -398,13 +400,13 @@ impl<'de> Deserialize<'de> for SystemHook {
};
let hook_res = match event_name.as_str() {
"project_create" |
"project_destroy" |
"project_rename" |
"project_transfer" => serde_json::from_value(val).map(SystemHook::Project),
"project_create" | "project_destroy" | "project_rename" | "project_transfer" => {
serde_json::from_value(val).map(SystemHook::Project)
},
"user_add_to_team" |
"user_remove_from_team" => serde_json::from_value(val).map(SystemHook::ProjectMember),
"user_add_to_team" | "user_remove_from_team" => {
serde_json::from_value(val).map(SystemHook::ProjectMember)
},
"user_create" | "user_destroy" => serde_json::from_value(val).map(SystemHook::User),
......@@ -412,14 +414,17 @@ impl<'de> Deserialize<'de> for SystemHook {
"group_create" | "group_destroy" => serde_json::from_value(val).map(SystemHook::Group),
"user_add_to_group" |
"user_remove_from_group" => serde_json::from_value(val).map(SystemHook::GroupMember),
"user_add_to_group" | "user_remove_from_group" => {
serde_json::from_value(val).map(SystemHook::GroupMember)
},
"push" | "tag_push" => serde_json::from_value(val).map(SystemHook::Push),
_ => {
return Err(D::Error::custom(format!("unrecognized system event name: {}",
event_name)));
return Err(D::Error::custom(format!(
"unrecognized system event name: {}",
event_name,
)));
},
};
......
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......
This diff is collapsed.
This diff is collapsed.
// Copyright 2016 Kitware, Inc.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
......@@ -14,13 +12,15 @@
//! version to version.
use crates::chrono::{DateTime, NaiveDate, TimeZone, Utc};
use crates::serde::{Deserialize, Deserializer, Serialize, Serializer};
use crates::serde::de::{Error, Unexpected};
use crates::serde::{Deserialize, Deserializer, Serialize, Serializer};
use crates::serde_json::{self, Value};
use types::{JobId, IssueId, IssueInternalId, IssueState,
MergeRequestId, MergeRequestInternalId, MergeRequestState, MergeStatus,
MilestoneId, NoteId, NoteType, NoteableId, ObjectId, ProjectId, SnippetId, UserId};
use types::{
IssueId, IssueInternalId, IssueState, JobId, MergeRequestId, MergeRequestInternalId,
MergeRequestState, MergeStatus, MilestoneId, NoteId, NoteType, NoteableId, ObjectId, ProjectId,
SnippetId, UserId,
};
#[derive(Debug, Clone, Copy)]
/// A wrapper struct for dates in web hooks.
......@@ -37,7 +37,8 @@ impl Serialize for HookDate {
impl<'de> Deserialize<'de> for HookDate {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,
where
D: Deserializer<'de>,
{
let val = String::deserialize(deserializer)?;
......@@ -45,8 +46,10 @@ impl<'de> Deserialize<'de> for HookDate {
.or_else(|_| {
DateTime::parse_from_str(&val, "%Y-%m-%d %H:%M:%S %z")
.map_err(|err| {
D::Error::invalid_value(Unexpected::Other("hook date"),
&format!("{:?}", err).as_str())
D::Error::invalid_value(
Unexpected::Other("hook date"),
&format!("{:?}", err).as_str(),
)
})
.map(|dt| dt.with_timezone(&Utc))
})
......@@ -60,7 +63,7 @@ impl AsRef<DateTime<Utc>> for HookDate {
}
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Project information exposed in hooks.
pub struct ProjectHookAttrs {
......@@ -90,7 +93,7 @@ pub struct ProjectHookAttrs {
url: String,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Wiki project information exposed in hooks.
pub struct ProjectWikiHookAttrs {
......@@ -106,7 +109,7 @@ pub struct ProjectWikiHookAttrs {
pub default_branch: String,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// User information exposed in hooks.
pub struct UserHookAttrs {
......@@ -118,7 +121,7 @@ pub struct UserHookAttrs {
pub avatar_url: Option<String>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// The identity of a user exposed through a hook.
pub struct HookCommitIdentity {
......@@ -128,7 +131,7 @@ pub struct HookCommitIdentity {
pub email: String,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Commit information exposed in hooks.
pub struct CommitHookAttrs {
......@@ -146,7 +149,7 @@ pub struct CommitHookAttrs {
pub removed: Option<Vec<String>>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A push hook.
pub struct PushHook {
......@@ -158,7 +161,7 @@ pub struct PushHook {
pub before: ObjectId,
/// The new object ID of the ref after the push.
pub after: ObjectId,
#[serde(rename="ref")]
#[serde(rename = "ref")]
/// The name of the reference which has been pushed.
pub ref_: String,
/// The new object ID of the ref after the push.
......@@ -207,7 +210,7 @@ enum_serialize!(IssueAction -> "issue action",
Reopen => "reopen",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Issue information exposed in hooks.
pub struct IssueHookAttrs {
......@@ -262,7 +265,7 @@ pub struct IssueHookAttrs {
pub action: Option<IssueAction>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// An issue hook.
pub struct IssueHook {
......@@ -300,7 +303,7 @@ enum_serialize!(MergeRequestAction -> "merge request action",
Merge => "merge",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Merge parameters for a merge request.
pub struct MergeRequestParams {
......@@ -328,7 +331,7 @@ impl MergeRequestParams {
}
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Merge request information exposed in hooks.
pub struct MergeRequestHookAttrs {
......@@ -402,7 +405,7 @@ pub struct MergeRequestHookAttrs {
lock_version: Option<u64>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A merge request hook.
pub struct MergeRequestHook {
......@@ -432,7 +435,7 @@ enum_serialize!(SnippetType -> "snippet type",
Personal => "PersonalSnippet",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Snippet information exposed in hooks.
pub struct SnippetHookAttrs {
......@@ -450,7 +453,7 @@ pub struct SnippetHookAttrs {
pub updated_at: HookDate,
/// The name of the snippet.
pub file_name: String,
#[serde(rename="type")]
#[serde(rename = "type")]
/// The type of the snippet.
pub type_: SnippetType,
/// The visibility of the snippet.
......@@ -470,7 +473,7 @@ enum_serialize!(WikiPageAction -> "wiki page action",
Update => "update",
);
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Wiki information exposed in hooks.
pub struct WikiPageHookAttrs {
......@@ -489,7 +492,7 @@ pub struct WikiPageHookAttrs {
pub action: WikiPageAction,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Diff information exposed in hooks.
pub struct DiffHookAttrs {
......@@ -512,9 +515,9 @@ pub struct DiffHookAttrs {
pub too_large: bool,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
// FIXME: This can apparently be a string sometimes.
// FIXME(gitlab#21467): This can apparently be a string sometimes.
// https://gitlab.com/gitlab-org/gitlab-ce/issues/21467
pub struct PositionHookAttrs {
pub base_sha: ObjectId,
......@@ -528,7 +531,7 @@ pub struct PositionHookAttrs {
pub new_path: String,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Note (comment) information exposed in hooks.
pub struct NoteHookAttrs {
......@@ -558,7 +561,7 @@ pub struct NoteHookAttrs {
pub project_id: ProjectId,
/// The URL of an attachment to the note.
pub attachment: Option<String>,
pub line_code: Option<String>, // TODO: This is some internal format.
pub line_code: Option<String>, // XXX: This is some internal format.
pub commit_id: Option<ObjectId>, // XXX(8.11): apparently can be an empty string?
pub discussion_id: ObjectId,
pub original_discussion_id: Option<ObjectId>,
......@@ -569,9 +572,11 @@ pub struct NoteHookAttrs {
/// The URL of the note.
pub url: String,
#[serde(rename="type")]
pub type_: Option<String>, // ???
//pub is_award: bool, // seems to have been removed?
// XXX: What is this field?
#[serde(rename = "type")]
pub type_: Option<String>,
// XXX: Seems to have been removed?
// pub is_award: bool,
}
impl NoteHookAttrs {
......@@ -602,7 +607,7 @@ impl NoteHookAttrs {
}
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A note hook.
pub struct NoteHook {
......@@ -627,7 +632,7 @@ pub struct NoteHook {
repository: Value,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Build user information exposed in hooks.
pub struct BuildUserHookAttrs {
......@@ -639,7 +644,7 @@ pub struct BuildUserHookAttrs {
pub email: Option<String>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Build commit information exposed in hooks.
pub struct BuildCommitHookAttrs {
......@@ -660,7 +665,7 @@ pub struct BuildCommitHookAttrs {
pub finished_at: Option<HookDate>,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// Project information exposed in build hooks.
pub struct BuildProjectHookAttrs {
......@@ -678,13 +683,13 @@ pub struct BuildProjectHookAttrs {
pub visibility_level: u64,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A build hook.
pub struct BuildHook {
/// The event which occurred.
pub object_kind: String,
#[serde(rename="ref")]
#[serde(rename = "ref")]
/// The name of the reference that was tested.
pub ref_: String,
pub tag: String,
......@@ -713,7 +718,7 @@ pub struct BuildHook {
pub repository: BuildProjectHookAttrs,
}
#[cfg_attr(feature="strict", serde(deny_unknown_fields))]
#[cfg_attr(feature = "strict", serde(deny_unknown_fields))]
#[derive(Serialize, Deserialize, Debug, Clone)]
/// A wiki page hook.
pub struct WikiPageHook {
......@@ -748,14 +753,18 @@ pub enum WebHook {
impl<'de> Deserialize<'de> for WebHook {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,
where
D: Deserializer<'de>,
{
let val = <Value as Deserialize>::deserialize(deserializer)?;
let object_kind = match val.pointer("/object_kind") {
Some(&Value::String(ref kind)) => kind.to_string(),
Some(_) => {
return Err(D::Error::invalid_type(Unexpected::Other("JSON value"), &"a string"));
return Err(D::Error::invalid_type(
Unexpected::Other("JSON value"),
&"a string",
));
},
None => {
return Err(D::Error::missing_field("object_kind"));
......@@ -774,17 +783,18 @@ impl<'de> Deserialize<'de> for WebHook {
"build" => serde_json::from_value(val).map(WebHook::Build),
_ => {
return Err(D::Error::invalid_value(Unexpected::Other("object kind"),
&format!("unrecognized webhook object kind: \
{}",
object_kind)
.as_str()));
return Err(D::Error::invalid_value(
Unexpected::Other("object kind"),
&format!("unrecognized webhook object kind: {}", object_kind).as_str(),
));
},
};
hook_res.map_err(|err| {
D::Error::invalid_value(Unexpected::Other("web hook"),
&format!("{:?}", err).as_str())
D::Error::invalid_value(
Unexpected::Other("web hook"),
&format!("{:?}", err).as_str(),
)
})
}
}
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