]> git.bitcoin.ninja Git - rust-lightning/commitdiff
fuck
authorMatt Corallo <git@bluematt.me>
Tue, 10 Jan 2023 05:21:26 +0000 (05:21 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 10 Jan 2023 05:21:26 +0000 (05:21 +0000)
lightning/src/debug_sync.rs

index 3cb0f4612d01122bfea49ff91e1f3978dd60cef7..13a3639e61d30130a0b1ffb685abe3043ce420ba 100644 (file)
@@ -84,13 +84,15 @@ fn get_construction_location(backtrace: &Backtrace) -> String {
                        let symbol_name = symbol.name().unwrap().as_str().unwrap();
                        if !sync_mutex_constr_regex.is_match(symbol_name) {
                                if found_debug_sync {
-                                       if let Some(col) = symbol.colno() {
-                                               return format!("{}:{}:{} ({})", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), col, symbol_name);
+                                       let res = if let Some(col) = symbol.colno() {
+                                               format!("{}:{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), col)
                                        } else {
                                                // Windows debug symbols don't support column numbers, so fall back to
                                                // line numbers only if no `colno` is available
-                                               return format!("{}:{} ({})", symbol.filename().unwrap().display(), symbol.lineno().unwrap(), symbol_name);
-                                       }
+                                               format!("{}:{}", symbol.filename().unwrap().display(), symbol.lineno().unwrap())
+                                       };
+eprintln!("{}: {}", res, symbol_name);
+return res;
                                }
                        } else { found_debug_sync = true; }
                }