Skip to content

Commit b90d648

Browse files
committed
Apparently immutable types aren't worth it for this case.
1 parent b1c42b4 commit b90d648

File tree

3 files changed

+4
-61
lines changed

3 files changed

+4
-61
lines changed

Cargo.lock

Lines changed: 0 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

memapi/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
im = "14.2.0"
1110
libc = "0.2"
1211
itertools = "0.8.2"
1312
lazy_static = "1.4.0"

memapi/src/memorytracking.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use im::vector as imvector;
21
use inferno::flamegraph;
32
use itertools::Itertools;
43
use libc;
@@ -8,22 +7,22 @@ use std::sync::Mutex;
87

98
#[derive(Clone, Debug, PartialEq)]
109
struct Callstack {
11-
calls: imvector::Vector<String>,
10+
calls: Vec<String>,
1211
}
1312

1413
impl Callstack {
1514
fn new() -> Callstack {
1615
Callstack {
17-
calls: imvector::Vector::<String>::new(),
16+
calls: Vec::<String>::new(),
1817
}
1918
}
2019

2120
fn start_call(&mut self, name: String) {
22-
self.calls.push_back(name);
21+
self.calls.push(name);
2322
}
2423

2524
fn finish_call(&mut self) {
26-
self.calls.pop_back();
25+
self.calls.pop();
2726
}
2827

2928
fn to_string(&self) -> String {

0 commit comments

Comments
 (0)