File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,6 @@ use sys_common::backtrace::*;
107
107
#[ cfg( all( target_os = "ios" , target_arch = "arm" ) ) ]
108
108
#[ inline( never) ]
109
109
pub fn write ( w : & mut Write ) -> io:: Result < ( ) > {
110
- use result;
111
-
112
110
extern {
113
111
fn backtrace ( buf : * mut * mut libc:: c_void ,
114
112
sz : libc:: c_int ) -> libc:: c_int ;
@@ -127,10 +125,10 @@ pub fn write(w: &mut Write) -> io::Result<()> {
127
125
let cnt = unsafe { backtrace ( buf. as_mut_ptr ( ) , SIZE as libc:: c_int ) as usize } ;
128
126
129
127
// skipping the first one as it is write itself
130
- let iter = ( 1 ..cnt) . map ( |i| {
131
- print ( w, i as isize , buf[ i] , buf[ i] )
132
- } ) ;
133
- result :: fold ( iter , ( ) , |_ , _| ( ) )
128
+ for i in 1 ..cnt {
129
+ try! ( print ( w, i as isize , buf[ i] , buf[ i] ) )
130
+ }
131
+ Ok ( ( ) )
134
132
}
135
133
136
134
#[ cfg( not( all( target_os = "ios" , target_arch = "arm" ) ) ) ]
You can’t perform that action at this time.
0 commit comments