From fa7a1c6d2947c9bfcee5654952d49c1cb368f0b0 Mon Sep 17 00:00:00 2001 From: Jonathan Schwender Date: Sat, 8 Feb 2025 11:40:00 +0100 Subject: [PATCH] Remove useless fallback Remove the line, since we already tried location.raw_comment() first. Originally the last `or_else` branch debug printed `location.raw_comment()`, but the print was removed in c94367c8e9607d3b6d5cf80f0c589971dca40f7c. --- bindgen/ir/item.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bindgen/ir/item.rs b/bindgen/ir/item.rs index bb03917792..8b0d24cd04 100644 --- a/bindgen/ir/item.rs +++ b/bindgen/ir/item.rs @@ -1590,10 +1590,7 @@ impl Item { canonical_def.unwrap_or_else(|| ty.declaration()) }; - let comment = location - .raw_comment() - .or_else(|| decl.raw_comment()) - .or_else(|| location.raw_comment()); + let comment = location.raw_comment().or_else(|| decl.raw_comment()); let annotations = Annotations::new(&decl).or_else(|| Annotations::new(&location));