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

Method parse_author

atomic-cli/src/commands/revise.rs:431–444  ·  view source on GitHub ↗

Parse author string into name and email.

(&self)

Source from the content-addressed store, hash-verified

429
430 /// Parse author string into name and email.
431 fn parse_author(&self) -> Option<(String, Option<String>)> {
432 self.author.as_ref().map(|author_str| {
433 // Try to parse "Name <email>" format
434 if let Some(start) = author_str.find('<') {
435 if let Some(end) = author_str.find('>') {
436 let name = author_str[..start].trim().to_string();
437 let email = author_str[start + 1..end].trim().to_string();
438 return (name, Some(email));
439 }
440 }
441 // Just a name
442 (author_str.trim().to_string(), None)
443 })
444 }
445
446 /// Display what would be done in dry-run mode.
447 fn display_dry_run(

Callers 4

execute_reviseMethod · 0.45
test_parse_author_fullFunction · 0.45

Calls 1

as_refMethod · 0.80

Tested by 3

test_parse_author_fullFunction · 0.36