summaryrefslogtreecommitdiffstats
path: root/src/schema.rs
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-07-11 20:49:49 +0200
committerPietro Albini <pietro@pietroalbini.org>2019-07-13 21:19:01 +0200
commit8578b7e3cdc93b583d5c25762ac36ec512c779f3 (patch)
tree78c5fde9f4f9cd6ea037a5ce0917bd1c09ace8a9 /src/schema.rs
parent474d58efe82228cafd02f025274eb411bbe0596a (diff)
add github ids to the people tomls
Diffstat (limited to 'src/schema.rs')
-rw-r--r--src/schema.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs
index c7a1b48..570b212 100644
--- a/src/schema.rs
+++ b/src/schema.rs
@@ -38,10 +38,11 @@ pub(crate) enum Email<'a> {
}
#[derive(serde_derive::Deserialize, Debug)]
-#[serde(deny_unknown_fields)]
+#[serde(deny_unknown_fields, rename_all = "kebab-case")]
pub(crate) struct Person {
name: String,
github: String,
+ github_id: usize,
irc: Option<String>,
#[serde(default)]
email: EmailField,
@@ -59,6 +60,10 @@ impl Person {
&self.github
}
+ pub(crate) fn github_id(&self) -> usize {
+ self.github_id
+ }
+
#[allow(unused)]
pub(crate) fn irc(&self) -> &str {
if let Some(irc) = &self.irc {