11use std:: io:: prelude:: * ;
22
3+ use crate :: core:: resolver:: encode:: EncodableResolve ;
34use crate :: core:: resolver:: encode:: into_resolve;
4- use crate :: core:: { Resolve , ResolveVersion , Workspace , resolver } ;
5+ use crate :: core:: { Resolve , ResolveVersion , Workspace } ;
56use crate :: util:: Filesystem ;
67use crate :: util:: errors:: CargoResult ;
78
@@ -23,7 +24,7 @@ pub fn load_pkg_lockfile(ws: &Workspace<'_>) -> CargoResult<Option<Resolve>> {
2324 . with_context ( || format ! ( "failed to read file: {}" , f. path( ) . display( ) ) ) ?;
2425
2526 let resolve = ( || -> CargoResult < Option < Resolve > > {
26- let v: resolver :: EncodableResolve = toml:: from_str ( & s) ?;
27+ let v: EncodableResolve = toml:: from_str ( & s) ?;
2728 Ok ( Some ( into_resolve ( v, & s, ws) ?) )
2829 } ) ( )
2930 . with_context ( || format ! ( "failed to parse lock file at: {}" , f. path( ) . display( ) ) ) ?;
@@ -207,8 +208,8 @@ fn are_equal_lockfiles(orig: &str, current: &str, ws: &Workspace<'_>) -> bool {
207208 // common case where we can update lock files.
208209 if !ws. gctx ( ) . lock_update_allowed ( ) {
209210 let res: CargoResult < bool > = ( || {
210- let old: resolver :: EncodableResolve = toml:: from_str ( orig) ?;
211- let new: resolver :: EncodableResolve = toml:: from_str ( current) ?;
211+ let old: EncodableResolve = toml:: from_str ( orig) ?;
212+ let new: EncodableResolve = toml:: from_str ( current) ?;
212213 Ok ( into_resolve ( old, orig, ws) ? == into_resolve ( new, current, ws) ?)
213214 } ) ( ) ;
214215 if let Ok ( true ) = res {
0 commit comments