diff options
author | Martin Robinson <mrobinson@igalia.com> | 2024-09-11 00:09:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 07:09:56 +0000 |
commit | bc8d8b62c3017dbdb413a636b80bc3a2df0172d6 (patch) | |
tree | 2f4de6402a0bfc56af023b4611bfe14fc59f8fa8 /components/net/filemanager_thread.rs | |
parent | 095590e2247517cf22e4aea7956f341a9a38b206 (diff) | |
download | servo-bc8d8b62c3017dbdb413a636b80bc3a2df0172d6.tar.gz servo-bc8d8b62c3017dbdb413a636b80bc3a2df0172d6.zip |
Stop using `time@0.1` in Servo (#33394)
This removes the last few uses of `time@0.1` in Servo. There are still
dependencies from `style` and `webrender`, but they will be removed soon
as well. The uses of this version of `time` are replaced with
`std::time` types and `time@0.3` when negative `Duration` is necessary.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/net/filemanager_thread.rs')
-rw-r--r-- | components/net/filemanager_thread.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs index 0e86905fd0d..9ed08c9d85b 100644 --- a/components/net/filemanager_thread.rs +++ b/components/net/filemanager_thread.rs @@ -57,8 +57,6 @@ struct FileStoreEntry { #[derive(Clone)] struct FileMetaData { path: PathBuf, - /// Modified time in UNIX Epoch format - _modified: u64, size: u64, } @@ -639,11 +637,6 @@ impl FileManagerStore { let modified = metadata .modified() .map_err(|e| FileSystemError(e.to_string()))?; - let elapsed = modified - .elapsed() - .map_err(|e| FileSystemError(e.to_string()))?; - // Unix Epoch: https://doc.servo.org/std/time/constant.UNIX_EPOCH.html - let modified_epoch = elapsed.as_secs() * 1000 + elapsed.subsec_nanos() as u64 / 1000000; let file_size = metadata.len(); let file_name = file_path .file_name() @@ -651,7 +644,6 @@ impl FileManagerStore { let file_impl = FileImpl::MetaDataOnly(FileMetaData { path: file_path.to_path_buf(), - _modified: modified_epoch, size: file_size, }); @@ -678,7 +670,7 @@ impl FileManagerStore { Ok(SelectedFile { id, filename: filename_path.to_path_buf(), - modified: modified_epoch, + modified, size: file_size, type_string, }) |