mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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>
This commit is contained in:
parent
095590e224
commit
bc8d8b62c3
18 changed files with 88 additions and 103 deletions
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue