Explorar o código

remove unnecessary closure

Joel Berger %!s(int64=11) %!d(string=hai) anos
pai
achega
14fe33b647
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mojolicious/app.pl

+ 1 - 1
mojolicious/app.pl

@@ -64,7 +64,7 @@ helper 'render_query' => sub {
     my $id = int rand 10_000;
     my $end = $delay->begin;
     $world->find_one({_id => $id} => sub {
-      my ($collection, $err, $doc) = @_;
+      my ($world, $err, $doc) = @_;
       if ($update) { $doc->{randomNumber} = 1 + int rand 10_000 };
       push @$r, { id => $id, randomNumber => $doc->{randomNumber} };
       $update ? $world->save($doc, $end) : $end->();