File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6666 match & * self . state . borrow ( ) {
6767 PromiseState :: Pending => {
6868 * self . then_callback . borrow_mut ( ) = Some ( Box :: new ( move |value| {
69- let result = f ( value. clone ( ) ) ;
69+ let result = f ( value) ;
7070 new_promise_clone. fulfill ( result) ;
7171 } ) ) ;
7272 let new_promise_for_catch = new_promise. clone ( ) ;
@@ -135,7 +135,7 @@ where
135135 . catch ( move |reason| {
136136 if !* rejected_clone_for_catch. borrow ( ) {
137137 * rejected_clone_for_catch. borrow_mut ( ) = true ;
138- next_promise_clone_for_catch. reject ( reason. clone ( ) ) ;
138+ next_promise_clone_for_catch. reject ( reason) ;
139139 }
140140 } ) ;
141141 }
@@ -164,7 +164,7 @@ where
164164 } )
165165 . catch ( move |err| {
166166 if first_error_clone. borrow ( ) . is_none ( ) {
167- * first_error_clone. borrow_mut ( ) = Some ( err. clone ( ) ) ;
167+ * first_error_clone. borrow_mut ( ) = Some ( err) ;
168168 }
169169
170170 * remaining_clone_for_catch. borrow_mut ( ) -= 1 ;
You can’t perform that action at this time.
0 commit comments