Skip to content

Commit ad6011b

Browse files
committed
chore(memtrack): remove outdated allocator check
1 parent 2dbb7cd commit ad6011b

2 files changed

Lines changed: 0 additions & 13 deletions

File tree

crates/memtrack/src/allocators/dynamic.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ pub fn find_all() -> anyhow::Result<Vec<AllocatorLib>> {
4949
let mut seen_paths: HashSet<PathBuf> = HashSet::new();
5050

5151
for kind in AllocatorKind::all() {
52-
let mut found_any = false;
53-
5452
for pattern in kind.search_patterns() {
5553
let paths = glob::glob(&pattern)
5654
.ok()
@@ -69,15 +67,9 @@ pub fn find_all() -> anyhow::Result<Vec<AllocatorLib>> {
6967
for path in paths {
7068
if seen_paths.insert(path.clone()) {
7169
results.push(AllocatorLib { kind: *kind, path });
72-
found_any = true;
7370
}
7471
}
7572
}
76-
77-
// FIXME: Do we still need this?
78-
if kind.is_required() && !found_any {
79-
anyhow::bail!("Could not find required allocator: {}", kind.name());
80-
}
8173
}
8274

8375
Ok(results)

crates/memtrack/src/allocators/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ impl AllocatorKind {
5959
AllocatorKind::Tcmalloc => "tcmalloc",
6060
}
6161
}
62-
63-
/// Returns true if this allocator is required (must be found).
64-
pub fn is_required(&self) -> bool {
65-
matches!(self, AllocatorKind::Libc)
66-
}
6762
}
6863

6964
/// Discovered allocator library with its kind and path.

0 commit comments

Comments
 (0)