@@ -188,7 +188,9 @@ impl Conflicts {
188
188
. filter ( |set| set. contains_item ( & canonical_item) )
189
189
{
190
190
for sub in & subs {
191
- let mut new_set = conflict_set. replaced_item ( & canonical_item, ( * * sub) . clone ( ) ) . expect ( "`ConflictItem` should be in `ConflictSet`" ) ;
191
+ let mut new_set = conflict_set
192
+ . replaced_item ( & canonical_item, ( * * sub) . clone ( ) )
193
+ . expect ( "`ConflictItem` should be in `ConflictSet`" ) ;
192
194
if !direct_conflict_sets. contains ( & new_set) {
193
195
new_set. set_as_inferred_conflict ( ) ;
194
196
if !transitive_conflict_sets. contains ( & new_set) {
@@ -258,7 +260,11 @@ impl ConflictSet {
258
260
259
261
// FIXME: Error if old is not present
260
262
/// Replace an old [`ConflictItem`] with a new one.
261
- pub fn replaced_item ( & self , old : & ConflictItem , new : ConflictItem ) -> Result < Self , ConflictError > {
263
+ pub fn replaced_item (
264
+ & self ,
265
+ old : & ConflictItem ,
266
+ new : ConflictItem ,
267
+ ) -> Result < Self , ConflictError > {
262
268
let mut new_set = self . set . clone ( ) ;
263
269
if !new_set. contains ( old) {
264
270
return Err ( ConflictError :: ReplaceMissingConflictItem ) ;
@@ -558,7 +564,7 @@ pub enum ConflictError {
558
564
#[ error( "Cycle detected in transitive conflict inclusion" ) ]
559
565
ConflictInclusionCycle ,
560
566
#[ error( "Expected `ConflictSet` to contain `ConflictItem` to replace" ) ]
561
- ReplaceMissingConflictItem
567
+ ReplaceMissingConflictItem ,
562
568
}
563
569
564
570
/// Like [`Conflicts`], but for deserialization in `pyproject.toml`.
0 commit comments