comparison rust/src/types.rs @ 623:03167105f6de rust

ignore missing local.conf
author Matt Johnston <matt@ucc.asn.au>
date Sun, 16 Apr 2017 22:50:20 +0800
parents 8136a6b99866
children efcbe0d3afd6
comparison
equal deleted inserted replaced
622:5b456905eaac 623:03167105f6de
109 TemplogError::new_kind(msg, TemplogErrorKind::Curl(e)) 109 TemplogError::new_kind(msg, TemplogErrorKind::Curl(e))
110 } 110 }
111 111
112 pub fn new_serde_json(msg: &str, e: serde_json::Error) -> Self { 112 pub fn new_serde_json(msg: &str, e: serde_json::Error) -> Self {
113 TemplogError::new_kind(msg, TemplogErrorKind::SerdeJson(e)) 113 TemplogError::new_kind(msg, TemplogErrorKind::SerdeJson(e))
114 }
115
116 pub fn kind(&self) -> &TemplogErrorKind {
117 return &self.kind;
114 } 118 }
115 119
116 fn new_kind(msg: &str, k: TemplogErrorKind) -> Self { 120 fn new_kind(msg: &str, k: TemplogErrorKind) -> Self {
117 let mut s = TemplogError { 121 let mut s = TemplogError {
118 msg: msg.to_string(), 122 msg: msg.to_string(),