mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-05 21:07:52 +00:00
fix: ignore scan_dir timeout in tests (#3184)
This commit is contained in:
parent
265b92bd51
commit
6e6ab9f212
@ -359,7 +359,8 @@ impl DirContents {
|
||||
fs::read_dir(base)?
|
||||
.enumerate()
|
||||
.take_while(|(n, _)| {
|
||||
n & 0xFF != 0 // only check timeout once every 2^8 entries
|
||||
cfg!(test) // ignore timeout during tests
|
||||
|| n & 0xFF != 0 // only check timeout once every 2^8 entries
|
||||
|| start.elapsed() < timeout
|
||||
})
|
||||
.filter_map(|(_, entry)| entry.ok())
|
||||
|
Loading…
Reference in New Issue
Block a user