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

Function format_author

atomic-cli/src/commands/log/command.rs:619–625  ·  view source on GitHub ↗

Format an author for display from an `Author` struct. Combines name and optional email into a standard `"Name "` format. # Arguments `author` - The author to format # Returns Formatted author string.

(author: &Author)

Source from the content-addressed store, hash-verified

617///
618/// Formatted author string.
619pub fn format_author(author: &Author) -> String {
620 if let Some(ref email) = author.email {
621 format!("{} <{}>", author.name, email)
622 } else {
623 author.name.clone()
624 }
625}
626
627/// Output configuration for log display.
628///

Callers 1

Calls 1

cloneMethod · 0.45

Tested by 1