From: Matt Corallo Date: Thu, 27 Oct 2022 00:20:38 +0000 (+0000) Subject: Handle path types that start with `crate::` X-Git-Tag: v0.0.112.0^2~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=1830b38012c4b6674458b63f384bd549fcb52470;p=ldk-c-bindings Handle path types that start with `crate::` --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index ecc508d..9462e98 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -650,6 +650,8 @@ impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr Some(format!("{}::{}{}", self.module_path, first_seg.ident, remaining)) } else if first_seg_is_stdlib(&first_seg_str) || self.dependencies.contains(&first_seg.ident) { Some(first_seg_str + &remaining) + } else if first_seg_str == "crate" { + Some(self.crate_name.to_owned() + &remaining) } else { None } } }