Skip to content

Commit

Permalink
prase_size: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhitkoff committed Oct 17, 2023
1 parent 74e01e3 commit abc9536
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/uucore/src/lib/parser/parse_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ impl<'parser> Parser<'parser> {

/// Same as `parse_u64()`, except returns `u64::MAX` on overflow
/// GNU lib/coreutils include similar functionality
/// and GNU test suite checks this behavior for some utils
/// and GNU test suite checks this behavior for some utils (`split` for example)
pub fn parse_u64_max(&self, size: &str) -> Result<u64, ParseSizeError> {
let result = self.parse_u64(size);
match result {
Expand All @@ -217,9 +217,7 @@ impl<'parser> Parser<'parser> {
}
}

/// Same as `parse_u128()`, except returns `u128::MAX` on overflow
/// /// GNU lib/coreutils include similar functionality
/// and GNU test suite checks this behavior for some utils
/// Same as `parse_u64_max()`, except for u128, i.e. returns `u128::MAX` on overflow
pub fn parse_u128_max(&self, size: &str) -> Result<u128, ParseSizeError> {
let result = self.parse_u128(size);
match result {
Expand Down

0 comments on commit abc9536

Please sign in to comment.