Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove some superfluous returns for performance
  • Loading branch information
lizmat committed Jan 13, 2016
1 parent 35f5821 commit 9463bd9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/Pod/To/Text.pm6
Expand Up @@ -80,7 +80,7 @@ sub table2text($pod) {
}
$ret ~= "\n";
}
return $ret;
$ret
}

sub declarator2text($pod) {
Expand All @@ -107,7 +107,7 @@ sub declarator2text($pod) {
''
}
}
return "$what\n{$pod.WHEREFORE.WHY.contents}"
"$what\n{$pod.WHEREFORE.WHY.contents}"
}

sub signature2text($params) {
Expand All @@ -125,10 +125,9 @@ my %formats =

sub formatting2text($pod) {
my $text = $pod.contents>>.&pod2text.join;
if $pod.type ~~ %formats {
return colored($text, %formats{$pod.type});
}
$text
$pod.type ~~ %formats
?? colored($text, %formats{$pod.type})
!! $text
}

sub twine2text($twine) {
Expand All @@ -138,12 +137,12 @@ sub twine2text($twine) {
$r ~= twine2text($f.contents);
$r ~= $s;
}
return $r;
$r;
}

sub twrap($text is copy, :$wrap=75 ) {
$text ~~ s:g/(. ** {$wrap} <[\s]>*)\s+/$0\n/;
return $text
$text
}

# vim: ft=perl6

0 comments on commit 9463bd9

Please sign in to comment.