File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,7 @@ impl Context {
68
68
& * link
69
69
) ;
70
70
}
71
- let mut inner: Vec < _ > = ( * * prev) . clone ( ) ;
72
- inner. push ( summary. clone ( ) ) ;
73
- * prev = Rc :: new ( inner) ;
71
+ Rc :: make_mut ( prev) . push ( summary. clone ( ) ) ;
74
72
return Ok ( false ) ;
75
73
}
76
74
debug ! ( "checking if {} is already activated" , summary. package_id( ) ) ;
@@ -246,15 +244,13 @@ impl Context {
246
244
if !reqs. used . is_empty ( ) {
247
245
let pkgid = s. package_id ( ) ;
248
246
249
- let set = self . resolve_features
247
+ let set = Rc :: make_mut ( self . resolve_features
250
248
. entry ( pkgid. clone ( ) )
251
- . or_insert_with ( || Rc :: new ( HashSet :: new ( ) ) ) ;
249
+ . or_insert_with ( || Rc :: new ( HashSet :: new ( ) ) ) ) ;
252
250
253
- let mut inner: HashSet < _ > = ( * * set) . clone ( ) ;
254
251
for feature in reqs. used {
255
- inner . insert ( InternedString :: new ( feature) ) ;
252
+ set . insert ( InternedString :: new ( feature) ) ;
256
253
}
257
- * set = Rc :: new ( inner) ;
258
254
}
259
255
260
256
Ok ( ret)
You can’t perform that action at this time.
0 commit comments