@@ -11,7 +11,6 @@ use pet_core::{
1111 Locator , LocatorKind , LocatorResult , RefreshStatePersistence , RefreshStateSyncScope ,
1212} ;
1313use pet_virtualenv:: is_virtualenv;
14- #[ cfg( windows) ]
1514use std:: path:: PathBuf ;
1615use std:: sync:: { Arc , Mutex } ;
1716
@@ -24,21 +23,18 @@ mod environments;
2423/// reporter (not into `LocatorResult`); without remembering the dirs,
2524/// every cache hit in `find()` would silently drop registry-only conda
2625/// notifications (issue #454).
27- #[ cfg( windows) ]
2826struct CachedRegistryWalk {
27+ #[ cfg_attr( not( windows) , allow( dead_code) ) ]
2928 result : LocatorResult ,
29+ #[ cfg_attr( not( windows) , allow( dead_code) ) ]
3030 conda_install_dirs : Vec < PathBuf > ,
3131}
3232
3333pub struct WindowsRegistry {
3434 #[ allow( dead_code) ]
3535 conda_locator : Arc < dyn CondaLocator > ,
3636 #[ allow( dead_code) ]
37- #[ cfg( windows) ]
3837 search_result : Arc < Mutex < Option < Arc < CachedRegistryWalk > > > > ,
39- #[ allow( dead_code) ]
40- #[ cfg( not( windows) ) ]
41- search_result : Arc < Mutex < Option < Arc < LocatorResult > > > > ,
4238}
4339
4440impl WindowsRegistry {
@@ -262,7 +258,6 @@ mod tests {
262258 WindowsRegistry :: from ( Arc :: new ( Conda :: from ( & environment) ) )
263259 }
264260
265- #[ cfg( windows) ]
266261 fn wrap_cached ( result : LocatorResult ) -> Arc < CachedRegistryWalk > {
267262 Arc :: new ( CachedRegistryWalk {
268263 result,
0 commit comments