Page MenuHomePhabricator

status: Extract TruncatedTimestamp from fs::Metadata without SystemTime
ClosedPublic

Authored by SimonSapin on Wed, Oct 13, 11:39 AM.

Details

Summary

On Unix, the Rust standard library exposes mtime and mtime_nsec methods
for std::fs::Metada whih is exactly what we need to construct a
TruncatedTimestamp. This skips the computation in the conversion through
SystemTime and Result<Duration, Duration>.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.