Skip to content

Commit 84ffbcb

Browse files
committed
Delete unneeded mut
1 parent cf78a6a commit 84ffbcb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

unwind/examples/trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use fallible_iterator::FallibleIterator;
77
use unwind::{Unwinder, DwarfUnwinder};
88

99
fn bar() {
10-
DwarfUnwinder::default().trace(|mut x| {
10+
DwarfUnwinder::default().trace(|x| {
1111
while let Some(frame) = x.next().unwrap() {
1212
backtrace::resolve(x.registers()[16].unwrap() as *mut std::os::raw::c_void, |sym| println!("{:?} ({:?}:{:?})", sym.name(), sym.filename(), sym.lineno()));
1313
println!("{:?}", frame);

unwind/src/libunwind_shim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub unsafe extern "C" fn _Unwind_RaiseException(exception: *mut _Unwind_Exceptio
114114
unreachable!();
115115
}
116116

117-
unsafe fn unwind_tracer(mut frames: &mut ::StackFrames, exception: *mut _Unwind_Exception) {
117+
unsafe fn unwind_tracer(frames: &mut ::StackFrames, exception: *mut _Unwind_Exception) {
118118
if let Some(contptr) = (*exception).private_contptr {
119119
loop {
120120
if let Some(frame) = frames.next().unwrap() {
@@ -156,7 +156,7 @@ unsafe fn unwind_tracer(mut frames: &mut ::StackFrames, exception: *mut _Unwind_
156156
pub unsafe extern "C" fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,
157157
trace_argument: *mut c_void)
158158
-> _Unwind_Reason_Code {
159-
DwarfUnwinder::default().trace(|mut frames| {
159+
DwarfUnwinder::default().trace(|frames| {
160160
while let Some(frame) = frames.next().unwrap() {
161161
let mut ctx = _Unwind_Context {
162162
lsda: frame.lsda.unwrap_or(0),

unwind/tests/correctness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn test_frame_3() {
2828
}
2929
println!();
3030

31-
DwarfUnwinder::default().trace(move |mut frames| {
31+
DwarfUnwinder::default().trace(move |frames| {
3232
// skip 2 (unwind-rs + test_frame_3)
3333
frames.next().unwrap();
3434
frames.next().unwrap();

0 commit comments

Comments
 (0)