Get a short display string for this author. Returns "Name \ " if email is present, otherwise just "Name".
(&self)
| 126 | /// |
| 127 | /// Returns "Name \<email\>" if email is present, otherwise just "Name". |
| 128 | pub fn display_short(&self) -> String { |
| 129 | match &self.email { |
| 130 | Some(email) => format!("{} <{}>", self.name, email), |
| 131 | None => self.name.clone(), |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | impl fmt::Display for Author { |