File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -911,7 +911,7 @@ pub struct SelfUpdateTestContext {
911911 pub config : Config ,
912912 _test_dir : TempDir ,
913913 #[ cfg( windows) ]
914- _registry_guard : Option < crate :: cli:: self_update:: RegistryGuard > ,
914+ _registry_guard : crate :: cli:: self_update:: RegistryGuard ,
915915 self_dist_tmp : TempDir ,
916916}
917917
@@ -965,7 +965,7 @@ pub struct CliTestContext {
965965 pub config : Config ,
966966 _test_dir : TempDir ,
967967 #[ cfg( windows) ]
968- _registry_guard : Option < crate :: cli:: self_update:: RegistryGuard > ,
968+ _registry_guard : crate :: cli:: self_update:: RegistryGuard ,
969969}
970970
971971impl CliTestContext {
@@ -997,7 +997,7 @@ impl CliTestContext {
997997 crate :: cli:: self_update:: RegistryGuard :: new ( [ & crate :: cli:: self_update:: USER_PATH ] )
998998 . unwrap ( ) ;
999999 config. set_registry_uuid ( & guard. uuid ) ;
1000- Some ( guard)
1000+ guard
10011001 } ;
10021002
10031003 Self {
@@ -1008,16 +1008,6 @@ impl CliTestContext {
10081008 }
10091009 }
10101010
1011- #[ cfg( windows) ]
1012- pub fn guard_registry (
1013- & mut self ,
1014- ids : impl IntoIterator < Item = & ' static crate :: cli:: self_update:: RegistryValueId > ,
1015- ) {
1016- let guard = crate :: cli:: self_update:: RegistryGuard :: new ( ids) . unwrap ( ) ;
1017- self . config . set_registry_uuid ( & guard. uuid ) ;
1018- self . _registry_guard = Some ( guard) ;
1019- }
1020-
10211011 /// Run a rustup command until it reaches `checkpoint` and terminate it.
10221012 pub fn kill_at < S : AsRef < OsStr > > ( & self , checkpoint : & str , args : impl AsRef < [ S ] > ) -> ExitStatus {
10231013 self . spawn_at ( checkpoint, args) . kill ( )
You can’t perform that action at this time.
0 commit comments