Commit 3e46c921f9

3e46c921f9f7ddbca3271f2debc60f8b65f8aa72

parent: 7a99a7eb3e

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-11-29 18:54 UTC

render: Remove a redundant whitespace for the member event rendering.

Layout: unified · split

src/render.rs +7 −7
@@ -509,7 +509,7 @@ pub fn render_membership(
509 match (displayname_changed, avatar_url_changed) { 509 match (displayname_changed, avatar_url_changed) {
510 (false, true) => 510 (false, true) =>
511 format!( 511 format!(
512 "{prefix} {target} {color_action}changed their avatar{color_reset}", 512 "{prefix}{target} {color_action}changed their avatar{color_reset}",
513 prefix = Weechat::prefix(prefix), 513 prefix = Weechat::prefix(prefix),
514 target = target_name, 514 target = target_name,
515 color_action = color_action, 515 color_action = color_action,
@@ -518,7 +518,7 @@ pub fn render_membership(
518 (true, false) => { 518 (true, false) => {
519 match new_display_name { 519 match new_display_name {
520 Some(name) => format!( 520 Some(name) => format!(
521 "{prefix} {target} {color_action}changed their display name to{color_reset} {new}", 521 "{prefix}{target} {color_action}changed their display name to{color_reset} {new}",
522 prefix = Weechat::prefix(prefix), 522 prefix = Weechat::prefix(prefix),
523 target = target_name, 523 target = target_name,
524 new = name, 524 new = name,
@@ -526,7 +526,7 @@ pub fn render_membership(
526 color_reset = color_reset 526 color_reset = color_reset
527 ), 527 ),
528 Option::None => format!( 528 Option::None => format!(
529 "{prefix} {target} {color_action}removed their display name{color_reset}", 529 "{prefix}{target} {color_action}removed their display name{color_reset}",
530 prefix = Weechat::prefix(prefix), 530 prefix = Weechat::prefix(prefix),
531 target = target_name, 531 target = target_name,
532 color_action = color_action, 532 color_action = color_action,
@@ -537,7 +537,7 @@ pub fn render_membership(
537 (true, true) => 537 (true, true) =>
538 match new_display_name { 538 match new_display_name {
539 Some(name) => format!( 539 Some(name) => format!(
540 "{prefix} {target} {color_action}changed their avatar \ 540 "{prefix}{target} {color_action}changed their avatar \
541 and changed their display name to{color_reset} {new}", 541 and changed their display name to{color_reset} {new}",
542 prefix = Weechat::prefix(prefix), 542 prefix = Weechat::prefix(prefix),
543 target = target_name, 543 target = target_name,
@@ -546,7 +546,7 @@ pub fn render_membership(
546 color_reset = color_reset 546 color_reset = color_reset
547 ), 547 ),
548 Option::None => format!( 548 Option::None => format!(
549 "{prefix} {target} {color_action}changed their \ 549 "{prefix}{target} {color_action}changed their \
550 avatar and removed display name{color_reset}", 550 avatar and removed display name{color_reset}",
551 prefix = Weechat::prefix(prefix), 551 prefix = Weechat::prefix(prefix),
552 target = target_name, 552 target = target_name,
@@ -560,7 +560,7 @@ pub fn render_membership(
560 } 560 }
561 Banned | Unbanned | Kicked | Invited | InvitationRevoked 561 Banned | Unbanned | Kicked | Invited | InvitationRevoked
562 | KickedAndBanned => format!( 562 | KickedAndBanned => format!(
563 "{prefix} {target} {op} {sender}", 563 "{prefix}{target} {op} {sender}",
564 prefix = Weechat::prefix(prefix), 564 prefix = Weechat::prefix(prefix),
565 target = target_name, 565 target = target_name,
566 op = operation, 566 op = operation,
@@ -568,7 +568,7 @@ pub fn render_membership(
568 ), 568 ),
569 None | Error | Joined | Left | InvitationRejected | _ => { 569 None | Error | Joined | Left | InvitationRejected | _ => {
570 format!( 570 format!(
571 "{prefix} {target} {op}", 571 "{prefix}{target} {op}",
572 prefix = Weechat::prefix(prefix), 572 prefix = Weechat::prefix(prefix),
573 target = target_name, 573 target = target_name,
574 op = operation 574 op = operation