File tree Expand file tree Collapse file tree
crates/memtrack/src/allocators Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments