@@ -9,9 +9,6 @@ use secrecy::SecretString;
99use std:: collections:: { BTreeMap , HashSet } ;
1010use std:: fmt:: { Display , Formatter } ;
1111
12- /// Special account that should own our managed crates.
13- const RUST_LANG_OWNER_ACCOUNT : & str = "rust-lang-owner" ;
14-
1512#[ derive( Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Debug ) ]
1613struct CrateName ( String ) ;
1714
@@ -161,14 +158,6 @@ impl SyncCratesIo {
161158 . list_crate_owners ( & krate. 0 )
162159 . with_context ( || anyhow:: anyhow!( "Cannot list crate owners of {krate}" ) ) ?;
163160
164- let mut owners_to_add = vec ! [ ] ;
165-
166- let rust_lang_owner = CratesIoOwner :: user ( RUST_LANG_OWNER_ACCOUNT . to_string ( ) ) ;
167- // Make sure that `rust-lang-owner` is an owner of each managed crate
168- if !owners. contains ( & rust_lang_owner) {
169- owners_to_add. push ( rust_lang_owner) ;
170- }
171-
172161 // Sync team owners
173162 let existing_teams: HashSet < CratesIoOwner > = owners
174163 . iter ( )
@@ -183,13 +172,14 @@ impl SyncCratesIo {
183172 . iter ( )
184173 . map ( |team| CratesIoOwner :: team ( team. org . clone ( ) , team. name . clone ( ) ) )
185174 . collect ( ) ;
186- let teams_to_add = target_teams. difference ( & existing_teams) . cloned ( ) ;
187- owners_to_add. extend ( teams_to_add) ;
188-
189- if !owners_to_add. is_empty ( ) {
175+ let teams_to_add = target_teams
176+ . difference ( & existing_teams)
177+ . cloned ( )
178+ . collect :: < Vec < _ > > ( ) ;
179+ if !teams_to_add. is_empty ( ) {
190180 crate_diffs. push ( CrateDiff :: AddOwners {
191181 krate : krate. to_string ( ) ,
192- owners : owners_to_add ,
182+ owners : teams_to_add ,
193183 } ) ;
194184 }
195185
0 commit comments