( )⚙ D11654 status: Extract TruncatedTimestamp from fs::Metadata without SystemTime

This is an archive of the discontinued Mercurial Phabricator instance.

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

Authored by SimonSapin on Oct 13 2021, 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
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage