@@ -250,8 +250,8 @@ pub fn generate_report<DB: ReadResults>(
250250 ) ;
251251
252252 Ok ( CrateResult {
253- name : crate_to_name ( & krate) ? ,
254- url : crate_to_url ( & krate) ? ,
253+ name : crate_to_name ( & krate) ,
254+ url : crate_to_url ( & krate) ,
255255 status : get_crate_version_status ( & index, & krate)
256256 . unwrap_or ( Some ( CrateVersionStatus :: MissingFromIndex ) ) ,
257257 krate : krate. clone ( ) ,
@@ -384,8 +384,8 @@ fn gen_retry_list(res: &RawTestResults) -> String {
384384 out
385385}
386386
387- fn crate_to_name ( c : & Crate ) -> Fallible < String > {
388- Ok ( match * c {
387+ fn crate_to_name ( c : & Crate ) -> String {
388+ match * c {
389389 Crate :: Registry ( ref details) => format ! ( "{}-{}" , details. name, details. version) ,
390390 Crate :: GitHub ( ref repo) => {
391391 if let Some ( ref sha) = repo. sha {
@@ -407,11 +407,11 @@ fn crate_to_name(c: &Crate) -> Fallible<String> {
407407 utf8_percent_encode ( & repo. url , & REPORT_ENCODE_SET ) . to_string ( )
408408 }
409409 }
410- } )
410+ }
411411}
412412
413- fn crate_to_url ( c : & Crate ) -> Fallible < String > {
414- Ok ( match * c {
413+ fn crate_to_url ( c : & Crate ) -> String {
414+ match * c {
415415 Crate :: Registry ( ref details) => format ! (
416416 "https://crates.io/crates/{}/{}" ,
417417 details. name, details. version
@@ -430,7 +430,7 @@ fn crate_to_url(c: &Crate) -> Fallible<String> {
430430 ) ,
431431 Crate :: Path ( ref path) => utf8_percent_encode ( path, & REPORT_ENCODE_SET ) . to_string ( ) ,
432432 Crate :: Git ( ref repo) => repo. url . clone ( ) ,
433- } )
433+ }
434434}
435435
436436fn compare (
@@ -672,7 +672,7 @@ mod tests {
672672 name : "lazy_static" . into ( ) ,
673673 version : "1.0" . into ( ) ,
674674 } ) ;
675- assert_eq ! ( crate_to_name( & reg) . unwrap ( ) , "lazy_static-1.0" . to_string( ) ) ;
675+ assert_eq ! ( crate_to_name( & reg) , "lazy_static-1.0" . to_string( ) ) ;
676676
677677 let repo = GitHubRepo {
678678 org : "brson" . into ( ) ,
@@ -681,7 +681,7 @@ mod tests {
681681 } ;
682682 let gh = Crate :: GitHub ( repo) ;
683683
684- assert_eq ! ( crate_to_name( & gh) . unwrap ( ) , "brson.hello-rs" . to_string( ) ) ;
684+ assert_eq ! ( crate_to_name( & gh) , "brson.hello-rs" . to_string( ) ) ;
685685
686686 let repo = GitHubRepo {
687687 org : "brson" . into ( ) ,
@@ -690,10 +690,7 @@ mod tests {
690690 } ;
691691 let gh = Crate :: GitHub ( repo) ;
692692
693- assert_eq ! (
694- crate_to_name( & gh) . unwrap( ) ,
695- "brson.hello-rs.f00" . to_string( )
696- ) ;
693+ assert_eq ! ( crate_to_name( & gh) , "brson.hello-rs.f00" . to_string( ) ) ;
697694 }
698695
699696 #[ test]
@@ -736,8 +733,8 @@ mod tests {
736733 version : "1.0" . into ( ) ,
737734 } ) ;
738735 assert_eq ! (
739- crate_to_url( & reg) . unwrap ( ) ,
740- "https://crates.io/crates/lazy_static/1.0" . to_string ( )
736+ crate_to_url( & reg) ,
737+ "https://crates.io/crates/lazy_static/1.0"
741738 ) ;
742739
743740 let repo = GitHubRepo {
@@ -747,10 +744,7 @@ mod tests {
747744 } ;
748745 let gh = Crate :: GitHub ( repo) ;
749746
750- assert_eq ! (
751- crate_to_url( & gh) . unwrap( ) ,
752- "https://github.com/brson/hello-rs" . to_string( )
753- ) ;
747+ assert_eq ! ( crate_to_url( & gh) , "https://github.com/brson/hello-rs" ) ;
754748
755749 let repo = GitHubRepo {
756750 org : "brson" . into ( ) ,
@@ -759,8 +753,8 @@ mod tests {
759753 } ;
760754 let gh = Crate :: GitHub ( repo) ;
761755 assert_eq ! (
762- crate_to_url( & gh) . unwrap ( ) ,
763- "https://github.com/brson/hello-rs/tree/f00" . to_string ( )
756+ crate_to_url( & gh) ,
757+ "https://github.com/brson/hello-rs/tree/f00"
764758 ) ;
765759 }
766760
0 commit comments