Skip to content

Commit

Permalink
another small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 20, 2014
1 parent deb6dd3 commit f1e861a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/Collection.pm
Expand Up @@ -89,9 +89,8 @@ sub sort {
sub tap { shift->Mojo::Base::tap(@_) }

sub uniq {
my $self = shift;
my %seen;
return $self->grep(sub { !$seen{$_}++ });
return shift->grep(sub { !$seen{$_}++ });
}

sub _flatten {
Expand Down

0 comments on commit f1e861a

Please sign in to comment.