@@ -42,7 +42,7 @@ impl<'a, 'old> Platform<'a, 'old> {
42
42
for_each : impl FnMut ( Change < ' _ , ' old , ' new > ) -> Result < Action , E > ,
43
43
) -> Result < Outcome , Error >
44
44
where
45
- E : std:: error:: Error + Sync + Send + ' static ,
45
+ E : Into < Box < dyn std:: error:: Error + Sync + Send + ' static > > ,
46
46
{
47
47
self . for_each_to_obtain_tree_inner ( other, for_each, None )
48
48
}
@@ -64,7 +64,7 @@ impl<'a, 'old> Platform<'a, 'old> {
64
64
for_each : impl FnMut ( Change < ' _ , ' old , ' new > ) -> Result < Action , E > ,
65
65
) -> Result < Outcome , Error >
66
66
where
67
- E : std:: error:: Error + Sync + Send + ' static ,
67
+ E : Into < Box < dyn std:: error:: Error + Sync + Send + ' static > > ,
68
68
{
69
69
self . for_each_to_obtain_tree_inner ( other, for_each, Some ( resource_cache) )
70
70
}
@@ -76,7 +76,7 @@ impl<'a, 'old> Platform<'a, 'old> {
76
76
resource_cache : Option < & mut gix_diff:: blob:: Platform > ,
77
77
) -> Result < Outcome , Error >
78
78
where
79
- E : std:: error:: Error + Sync + Send + ' static ,
79
+ E : Into < Box < dyn std:: error:: Error + Sync + Send + ' static > > ,
80
80
{
81
81
let repo = self . lhs . repo ;
82
82
let mut delegate = Delegate {
@@ -99,14 +99,14 @@ impl<'a, 'old> Platform<'a, 'old> {
99
99
rewrites : delegate. process_tracked_changes ( resource_cache) ?,
100
100
} ;
101
101
match delegate. err {
102
- Some ( err) => Err ( Error :: ForEach ( Box :: new ( err) ) ) ,
102
+ Some ( err) => Err ( Error :: ForEach ( err. into ( ) ) ) ,
103
103
None => Ok ( outcome) ,
104
104
}
105
105
}
106
106
Err ( gix_diff:: tree:: changes:: Error :: Cancelled ) => delegate
107
107
. err
108
108
. map_or ( Err ( Error :: Diff ( gix_diff:: tree:: changes:: Error :: Cancelled ) ) , |err| {
109
- Err ( Error :: ForEach ( Box :: new ( err) ) )
109
+ Err ( Error :: ForEach ( err. into ( ) ) )
110
110
} ) ,
111
111
Err ( err) => Err ( err. into ( ) ) ,
112
112
}
@@ -126,7 +126,7 @@ struct Delegate<'a, 'old, 'new, VisitFn, E> {
126
126
impl < ' a , ' old , ' new , VisitFn , E > Delegate < ' a , ' old , ' new , VisitFn , E >
127
127
where
128
128
VisitFn : for < ' delegate > FnMut ( Change < ' delegate , ' old , ' new > ) -> Result < Action , E > ,
129
- E : std:: error:: Error + Sync + Send + ' static ,
129
+ E : Into < Box < dyn std:: error:: Error + Sync + Send + ' static > > ,
130
130
{
131
131
/// Call `visit` on an attached version of `change`.
132
132
fn emit_change (
@@ -240,7 +240,7 @@ where
240
240
impl < ' a , ' old , ' new , VisitFn , E > gix_diff:: tree:: Visit for Delegate < ' a , ' old , ' new , VisitFn , E >
241
241
where
242
242
VisitFn : for < ' delegate > FnMut ( Change < ' delegate , ' old , ' new > ) -> Result < Action , E > ,
243
- E : std:: error:: Error + Sync + Send + ' static ,
243
+ E : Into < Box < dyn std:: error:: Error + Sync + Send + ' static > > ,
244
244
{
245
245
fn pop_front_tracked_path_and_set_current ( & mut self ) {
246
246
self . recorder . pop_front_tracked_path_and_set_current ( )
0 commit comments