From 22e7f3ad672473f19ae5107602e57e9361b8b7f2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 17 Aug 2016 23:07:43 +0000 Subject: view: attach_link uses string concatentation There is no point in using an array to join on an empty string (my original intention was probably to join on "\n"). This is only preparation for the next change to show a warning to in the attachment link. --- lib/PublicInbox/View.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 6f79f601..30572216 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -427,10 +427,10 @@ sub attach_link ($$$$) { } else { $sfn = 'a.bin'; } - my @ret = qq($nl[-- Attachment #$idx: ); + my $ret = qq($nl[-- Attachment #$idx: ); my $ts = "Type: $ct, Size: $size bytes"; - push(@ret, ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]"); - join('', @ret, "\n"); + $ret .= ($desc eq '') ? "$ts --]" : "$desc --]\n[-- $ts --]"; + $ret .= "\n"; } sub add_text_body { -- cgit v1.2.3-24-ge0c7