Skip to content

Commit bca44d0

Browse files
committed
f fix warning
1 parent 145e10d commit bca44d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/debug_sync.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static LOCKS_INIT: Once = Once::new();
6565
struct LockMetadata {
6666
lock_idx: u64,
6767
locked_before: StdMutex<HashSet<LockDep>>,
68-
lock_construction_bt: Backtrace,
68+
_lock_construction_bt: Backtrace,
6969
}
7070
impl PartialEq for LockMetadata {
7171
fn eq(&self, o: &LockMetadata) -> bool { self.lock_idx == o.lock_idx }
@@ -132,7 +132,7 @@ impl LockMetadata {
132132
let res = Arc::new(LockMetadata {
133133
locked_before: StdMutex::new(HashSet::new()),
134134
lock_idx,
135-
lock_construction_bt: backtrace,
135+
_lock_construction_bt: backtrace,
136136
});
137137

138138
#[cfg(feature = "backtrace")]
@@ -168,7 +168,7 @@ impl LockMetadata {
168168
for locked_dep in locked.locked_before.lock().unwrap().iter() {
169169
if locked_dep.lock == *this && locked_dep.lock != *locked {
170170
#[cfg(feature = "backtrace")]
171-
panic!("Tried to violate existing lockorder.\nMutex that should be locked after the current lock was created at the following backtrace.\nNote that to get a backtrace for the lockorder violation, you should set RUST_BACKTRACE=1\nLock constructed at:\n{:?}\n\nLock dep created at:\n{:?}\n\n", locked.lock_construction_bt, locked_dep.lockdep_trace);
171+
panic!("Tried to violate existing lockorder.\nMutex that should be locked after the current lock was created at the following backtrace.\nNote that to get a backtrace for the lockorder violation, you should set RUST_BACKTRACE=1\nLock constructed at:\n{:?}\n\nLock dep created at:\n{:?}\n\n", locked._lock_construction_bt, locked_dep.lockdep_trace);
172172
#[cfg(not(feature = "backtrace"))]
173173
panic!("Tried to violate existing lockorder. Build with the backtrace feature for more info.");
174174
}

0 commit comments

Comments
 (0)