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

Method parse_author

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

Parse author string into name and email.

(&self)

Source from the content-addressed store, hash-verified

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