mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-18 19:21:09 +00:00
Merge pull request #2497 from 353fc443/sleep
sleep: fixing clippy warnings
This commit is contained in:
commit
92dafbd8a3
1 changed files with 6 additions and 3 deletions
|
|
@ -5,6 +5,9 @@
|
|||
// * For the full copyright and license information, please view the LICENSE
|
||||
// * file that was distributed with this source code.
|
||||
|
||||
// clippy bug https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
#![allow(clippy::nonstandard_macro_braces)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
|
|
@ -70,9 +73,9 @@ fn sleep(args: Vec<&str>) -> UResult<()> {
|
|||
Duration::new(0, 0),
|
||||
|result, arg| match uucore::parse_time::from_str(&arg[..]) {
|
||||
Ok(m) => Ok(m + result),
|
||||
Err(f) => Err(USimpleError::new(1, format!("{}", f))),
|
||||
Err(f) => Err(USimpleError::new(1, f)),
|
||||
},
|
||||
)?;
|
||||
|
||||
Ok(thread::sleep(sleep_dur))
|
||||
thread::sleep(sleep_dur);
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue