File: 2002_instant.patch

package info (click to toggle)
rust-egg 0.6.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 568 kB
  • sloc: javascript: 187; makefile: 43; sh: 35
file content (48 lines) | stat: -rw-r--r-- 1,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: avoid deprecated crate instant
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: not-needed
Last-Update: 2026-04-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,7 +15,6 @@
 log = "0.4"
 smallvec = "1"
 indexmap = "2.13.0"
-instant = "0.1"
 once_cell = "1"
 
 [dev-dependencies]
--- a/src/egraph.rs
+++ b/src/egraph.rs
@@ -677,7 +677,7 @@
         let old_hc_size = self.memo.len();
         let old_n_eclasses = self.number_of_classes();
 
-        let start = instant::Instant::now();
+        let start = std::time::Instant::now();
 
         self.process_unions();
         let n_unions = std::mem::take(&mut self.repairs_since_rebuild);
--- a/src/rewrite.rs
+++ b/src/rewrite.rs
@@ -128,7 +128,7 @@
     /// from the `egg::run` module
     #[cfg(test)]
     pub(crate) fn run(&self, egraph: &mut EGraph<L, N>) -> Vec<Id> {
-        let start = instant::Instant::now();
+        let start = std::time::Instant::now();
 
         let matches = self.search(egraph);
         log::debug!("Found rewrite {} {} times", self.name, matches.len());
--- a/src/run.rs
+++ b/src/run.rs
@@ -1,5 +1,6 @@
 use indexmap::{IndexMap, IndexSet};
-use instant::{Duration, Instant};
+use std::time::Instant;
+use std::time::Duration;
 use log::*;
 
 use crate::{Analysis, EGraph, Id, Language, RecExpr, Rewrite, SearchMatches};