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

Method parse_author

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

Parse author string into name and email.

(&self)

Source from the content-addressed store, hash-verified

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