tailhook / humantime

A parser and formatter for std::time::{SystemTime, Duration}
Apache License 2.0
283 stars 34 forks source link

Minor improvements #25

Closed Bond-009 closed 2 years ago

Bond-009 commented 2 years ago

Fixes some clippy warnings and makes some code more idiomatic

tailhook commented 2 years ago

Part of this was explicitly converted this way by another contributor: https://github.com/tailhook/humantime/commit/f00dbbae37ac281c919fbf0d56caf5900f1e0085

I'm okay with either way. But it's bad if we constantly change that forward and back.

Other that that, It looks fine.

Bond-009 commented 2 years ago

Looks like he changed them just like me (based on clippy warnings) and reverted them based on your comments. https://github.com/tailhook/humantime/pull/11#discussion_r368011334 https://github.com/tailhook/humantime/pull/11#discussion_r368012134 In the end it's your choice, but in my opinion it's a smart move to listen to the official lints.

tailhook commented 2 years ago

Ah, sorry then. Merged!