@@ -116,7 +116,7 @@ pub fn rustdoc_redirector_handler(req: &mut Request) -> IronResult<Response> {
116
116
117
117
let path = req. url . path ( ) ;
118
118
let path = path. join ( "/" ) ;
119
- return match File :: from_path ( & storage, & path, & config) {
119
+ return match File :: from_path ( storage, & path, config) {
120
120
Ok ( f) => Ok ( f. serve ( ) ) ,
121
121
Err ( ..) => Err ( Nope :: ResourceNotFound . into ( ) ) ,
122
122
} ;
@@ -328,7 +328,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
328
328
329
329
// Get the crate's details from the database
330
330
// NOTE: we know this crate must exist because we just checked it above (or else `match_version` is buggy)
331
- let krate = cexpect ! ( req, CrateDetails :: new( & mut conn, & name, & version, & updater) ) ;
331
+ let krate = cexpect ! ( req, CrateDetails :: new( & mut conn, & name, & version, updater) ) ;
332
332
333
333
// if visiting the full path to the default target, remove the target from the path
334
334
// expects a req_path that looks like `[/:target]/.*`
@@ -353,7 +353,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
353
353
let mut path = ctry ! ( req, percent_decode( path. as_bytes( ) ) . decode_utf8( ) ) ;
354
354
355
355
// Attempt to load the file from the database
356
- let file = match File :: from_path ( & storage, & path, & config) {
356
+ let file = match File :: from_path ( storage, & path, config) {
357
357
Ok ( file) => file,
358
358
Err ( err) => {
359
359
log:: debug!( "got error serving {}: {}" , path, err) ;
@@ -543,7 +543,7 @@ pub fn target_redirect_handler(req: &mut Request) -> IronResult<Response> {
543
543
let base = redirect_base ( req) ;
544
544
let updater = extension ! ( req, RepositoryStatsUpdater ) ;
545
545
546
- let crate_details = match CrateDetails :: new ( & mut conn, & name, & version, & updater) {
546
+ let crate_details = match CrateDetails :: new ( & mut conn, name, version, updater) {
547
547
Some ( krate) => krate,
548
548
None => return Err ( Nope :: VersionNotFound . into ( ) ) ,
549
549
} ;
@@ -568,8 +568,8 @@ pub fn target_redirect_handler(req: &mut Request) -> IronResult<Response> {
568
568
let path = path_for_version (
569
569
& file_path,
570
570
& crate_details. metadata . doc_targets ,
571
- & storage,
572
- & config,
571
+ storage,
572
+ config,
573
573
) ;
574
574
let url = format ! (
575
575
"{base}/{name}/{version}/{path}" ,
@@ -601,7 +601,7 @@ pub fn badge_handler(req: &mut Request) -> IronResult<Response> {
601
601
let mut conn = extension ! ( req, Pool ) . get ( ) ?;
602
602
603
603
let options =
604
- match match_version ( & mut conn, & name, Some ( & version) ) . and_then ( |m| m. assume_exact ( ) ) {
604
+ match match_version ( & mut conn, name, Some ( & version) ) . and_then ( |m| m. assume_exact ( ) ) {
605
605
Ok ( MatchSemver :: Exact ( ( version, id) ) ) => {
606
606
let rows = ctry ! (
607
607
req,
@@ -681,7 +681,7 @@ impl Handler for SharedResourceHandler {
681
681
let storage = extension ! ( req, Storage ) ;
682
682
let config = extension ! ( req, Config ) ;
683
683
684
- if let Ok ( file) = File :: from_path ( & storage, filename, & config) {
684
+ if let Ok ( file) = File :: from_path ( storage, filename, config) {
685
685
return Ok ( file. serve ( ) ) ;
686
686
}
687
687
}
0 commit comments