Skip to content

Commit 6b06491

Browse files
committed
Address comment
1 parent 6bc7e4e commit 6b06491

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cloud-core/src/main/java/org/incendo/cloud/parser/standard/DurationParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public final class DurationParser<C> implements ArgumentParser<C, Duration>, Blo
7777
final @NonNull CommandContext<C> commandContext,
7878
final @NonNull CommandInput commandInput
7979
) {
80-
final String input = commandInput.peekString();
80+
final String input = commandInput.readString();
8181

8282
Duration duration = Duration.ofNanos(0);
8383

@@ -130,7 +130,6 @@ public final class DurationParser<C> implements ArgumentParser<C, Duration>, Blo
130130
return ArgumentParseResult.failure(new DurationParseException(input, commandContext));
131131
}
132132

133-
commandInput.readString(); // pop read input on success
134133
return ArgumentParseResult.success(duration);
135134
}
136135

0 commit comments

Comments
 (0)