()
| 112 | } |
| 113 | |
| 114 | pub fn find_all() -> anyhow::Result<Vec<AllocatorLib>> { |
| 115 | let build_dirs = find_build_dirs(); |
| 116 | if build_dirs.is_empty() { |
| 117 | return Ok(vec![]); |
| 118 | } |
| 119 | |
| 120 | let mut allocators = Vec::new(); |
| 121 | for build_dir in build_dirs { |
| 122 | let bins = find_binaries_in_dir(&build_dir); |
| 123 | |
| 124 | for bin in bins { |
| 125 | let Some(kind) = find_statically_linked_allocator(&bin) else { |
| 126 | continue; |
| 127 | }; |
| 128 | |
| 129 | allocators.push(AllocatorLib { kind, path: bin }); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | Ok(allocators) |
| 134 | } |
| 135 | |
| 136 | impl AllocatorLib { |
| 137 | pub fn from_path_static(path: &Path) -> Result<Self, Box<dyn std::error::Error>> { |
nothing calls this directly
no test coverage detected