File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ lazy_static! {
2424/// a crate to exist and don't need to test behavior caused by the publish request, inserting
2525/// a crate into the database directly by using CrateBuilder will be faster.
2626pub struct PublishBuilder {
27- authors : Vec < String > ,
2827 badges : HashMap < String , HashMap < String , String > > ,
2928 categories : Vec < String > ,
3029 deps : Vec < u:: EncodableCrateDependency > ,
@@ -44,7 +43,6 @@ impl PublishBuilder {
4443 /// in its tarball.
4544 pub fn new ( krate_name : & str ) -> Self {
4645 PublishBuilder {
47- authors : vec ! [ "foo" . to_string( ) ] ,
4846 badges : HashMap :: new ( ) ,
4947 categories : vec ! [ ] ,
5048 deps : vec ! [ ] ,
@@ -168,18 +166,6 @@ impl PublishBuilder {
168166 self
169167 }
170168
171- /// Add an author to this crate
172- pub fn author ( mut self , author : & str ) -> Self {
173- self . authors . push ( author. into ( ) ) ;
174- self
175- }
176-
177- /// Remove the authors from this crate. Publish will fail unless authors are reset.
178- pub fn unset_authors ( mut self ) -> Self {
179- self . authors = vec ! [ ] ;
180- self
181- }
182-
183169 pub fn build ( self ) -> ( String , Vec < u8 > ) {
184170 let new_crate = u:: EncodableCrateUpload {
185171 name : u:: EncodableCrateName ( self . krate_name . clone ( ) ) ,
Original file line number Diff line number Diff line change @@ -824,8 +824,7 @@ fn license_and_description_required() {
824824 let crate_to_publish = PublishBuilder :: new ( "foo_metadata" )
825825 . version ( "1.1.0" )
826826 . unset_license ( )
827- . unset_description ( )
828- . unset_authors ( ) ;
827+ . unset_description ( ) ;
829828
830829 let response = token. enqueue_publish ( crate_to_publish) ;
831830 assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
@@ -836,9 +835,7 @@ fn license_and_description_required() {
836835
837836 let crate_to_publish = PublishBuilder :: new ( "foo_metadata" )
838837 . version ( "1.1.0" )
839- . unset_description ( )
840- . unset_authors ( )
841- . author ( "" ) ;
838+ . unset_description ( ) ;
842839
843840 let response = token. enqueue_publish ( crate_to_publish) ;
844841 assert_eq ! ( response. status( ) , StatusCode :: OK ) ;
You can’t perform that action at this time.
0 commit comments