@@ -27,7 +27,7 @@ pub fn vendor(ws: &Workspace<'_>, opts: &VendorOptions<'_>) -> CargoResult<()> {
2727 }
2828 let workspaces = extra_workspaces. iter ( ) . chain ( Some ( ws) ) . collect :: < Vec < _ > > ( ) ;
2929 let vendor_config =
30- sync ( ws. config ( ) , & workspaces, opts) . chain_err ( || format ! ( "failed to sync" ) ) ?;
30+ sync ( ws. config ( ) , & workspaces, opts) . chain_err ( || "failed to sync" . to_string ( ) ) ?;
3131
3232 let shell = ws. config ( ) . shell ( ) ;
3333 if shell. verbosity ( ) != Verbosity :: Quiet {
@@ -97,7 +97,7 @@ fn sync(
9797 // crate to work with.
9898 for ws in workspaces {
9999 let ( packages, resolve) =
100- ops:: resolve_ws ( & ws) . chain_err ( || "failed to load pkg lockfile" ) ?;
100+ ops:: resolve_ws ( ws) . chain_err ( || "failed to load pkg lockfile" ) ?;
101101
102102 packages
103103 . get_many ( resolve. iter ( ) )
@@ -129,7 +129,7 @@ fn sync(
129129 // tables about them.
130130 for ws in workspaces {
131131 let ( packages, resolve) =
132- ops:: resolve_ws ( & ws) . chain_err ( || "failed to load pkg lockfile" ) ?;
132+ ops:: resolve_ws ( ws) . chain_err ( || "failed to load pkg lockfile" ) ?;
133133
134134 packages
135135 . get_many ( resolve. iter ( ) )
@@ -142,14 +142,14 @@ fn sync(
142142 continue ;
143143 }
144144 ids. insert (
145- pkg. clone ( ) ,
145+ pkg,
146146 packages
147147 . get_one ( pkg)
148148 . chain_err ( || "failed to fetch package" ) ?
149149 . clone ( ) ,
150150 ) ;
151151
152- checksums. insert ( pkg. clone ( ) , resolve. checksums ( ) . get ( & pkg) . cloned ( ) ) ;
152+ checksums. insert ( pkg, resolve. checksums ( ) . get ( & pkg) . cloned ( ) ) ;
153153 }
154154 }
155155
@@ -204,10 +204,10 @@ fn sync(
204204 ) ?;
205205
206206 let _ = fs:: remove_dir_all ( & dst) ;
207- let pathsource = PathSource :: new ( & src, id. source_id ( ) , config) ;
208- let paths = pathsource. list_files ( & pkg) ?;
207+ let pathsource = PathSource :: new ( src, id. source_id ( ) , config) ;
208+ let paths = pathsource. list_files ( pkg) ?;
209209 let mut map = BTreeMap :: new ( ) ;
210- cp_sources ( & src, & paths, & dst, & mut map)
210+ cp_sources ( src, & paths, & dst, & mut map)
211211 . chain_err ( || format ! ( "failed to copy over vendored sources for: {}" , id) ) ?;
212212
213213 // Finally, emit the metadata about this package
0 commit comments