1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-05 15:37:47 +00:00

Get rid of all warnings on Linux (or at least WSL)

This commit is contained in:
Alex Lyon 2019-04-28 19:55:18 -07:00 committed by Roy Ivy III
parent 77cc8d39c6
commit d81d3e3c71

View file

@ -10,7 +10,7 @@ use std::error::Error;
pub fn parse_numeric(fperm: u32, mut mode: &str) -> Result<u32, String> { pub fn parse_numeric(fperm: u32, mut mode: &str) -> Result<u32, String> {
let (op, pos) = parse_op(mode, Some('='))?; let (op, pos) = parse_op(mode, Some('='))?;
mode = mode[pos..].trim_left_matches('0'); mode = mode[pos..].trim_start_matches('0');
if mode.len() > 4 { if mode.len() > 4 {
Err(format!("mode is too large ({} > 7777)", mode)) Err(format!("mode is too large ({} > 7777)", mode))
} else { } else {