mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
Fix filter/findFirst order
This commit is contained in:
1 file changed
+2
-2
@@ -114,8 +114,8 @@ public class DeleteMessageCommand extends CarbonCommand {
|
||||
}
|
||||
|
||||
private static ArgumentParseResult<MessageSignature> result(final Queue<String> inputQueue, final Stream<Pair<MessageSignature, UUID>> stream) {
|
||||
return stream.findFirst()
|
||||
.filter(s -> s.getSecond().toString().equals(inputQueue.peek()))
|
||||
return stream.filter(s -> s.getSecond().toString().equals(inputQueue.peek()))
|
||||
.findFirst()
|
||||
.map(pair -> {
|
||||
inputQueue.poll();
|
||||
return ArgumentParseResult.success(pair.getFirst());
|
||||
|
||||
Reference in new issue
Block a user