MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / display_short

Method display_short

atomic-core/src/change/header.rs:128–133  ·  view source on GitHub ↗

Get a short display string for this author. Returns "Name \ " if email is present, otherwise just "Name".

(&self)

Source from the content-addressed store, hash-verified

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
136impl fmt::Display for Author {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected