Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
Co-authored-by: messense <[email protected]>
  • Loading branch information
robsdedude and messense authored Nov 2, 2023
1 parent 1b3d8f3 commit 2e09bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl Metadata21 {
for author in authors {
match (&author.name, &author.email) {
(Some(name), Some(email)) => {
emails.push(format_email_with_display_name(name, email));
emails.push(escape_email_with_display_name(name, email));
}
(Some(name), None) => {
names.push(name.as_str());
Expand All @@ -251,7 +251,7 @@ impl Metadata21 {
for maintainer in maintainers {
match (&maintainer.name, &maintainer.email) {
(Some(name), Some(email)) => {
emails.push(format_email_with_display_name(name, email));
emails.push(escape_email_with_display_name(name, email));
}
(Some(name), None) => {
names.push(name.as_str());
Expand Down Expand Up @@ -557,7 +557,7 @@ impl Metadata21 {

/// Escape email addresses with display name if necessary
/// according to RFC 822 Section 3.3. "specials".
fn format_email_with_display_name(display_name: &str, email: &str) -> String {
fn escape_email_with_display_name(display_name: &str, email: &str) -> String {
if display_name.chars().any(|c| {
matches!(
c,
Expand Down

0 comments on commit 2e09bc1

Please sign in to comment.