From 1f8c79a3c13efc3b9283620c02796ef8dd03a5b9 Mon Sep 17 00:00:00 2001 From: Biagio Festa Date: Wed, 23 Apr 2025 14:50:30 +0200 Subject: [PATCH] Fix parsing submodule dir for 2018 convention --- src/bindgen/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindgen/parser.rs b/src/bindgen/parser.rs index 13fa3f7e4..8c6767d40 100644 --- a/src/bindgen/parser.rs +++ b/src/bindgen/parser.rs @@ -263,7 +263,7 @@ impl Parser<'_> { let mod_dir = mod_path.parent().unwrap(); - let is_mod_rs = depth == 0 || mod_path.ends_with("mod.rs"); + let is_mod_rs = mod_path.ends_with("lib.rs") || mod_path.ends_with("mod.rs"); let submod_dir = if is_mod_rs { mod_dir } else {