projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ee7c2a
)
Fix typo in path resolution leading to a "crate name" of a full path
author
Matt Corallo
<git@bluematt.me>
Mon, 27 Feb 2023 21:45:14 +0000
(21:45 +0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 6 Mar 2023 04:16:09 +0000
(
04:16
+0000)
c-bindings-gen/src/types.rs
patch
|
blob
|
history
diff --git
a/c-bindings-gen/src/types.rs
b/c-bindings-gen/src/types.rs
index 85ce3e9fc1472202f2b0cb55346169baaa141207..029fc63f807b721c9add26e21488d69c86f9c62c 100644
(file)
--- a/
c-bindings-gen/src/types.rs
+++ b/
c-bindings-gen/src/types.rs
@@
-668,7
+668,7
@@
impl<'mod_lifetime, 'crate_lft: 'mod_lifetime> ImportResolver<'mod_lifetime, 'cr
// Now that we've resolved the path to the path as-imported, check whether the path
// is actually a pub(.*) use statement and map it to the real path.
let path_tmp = path.clone();
- let crate_name = path_tmp.splitn(
1
, "::").next().unwrap();
+ let crate_name = path_tmp.splitn(
2
, "::").next().unwrap();
let mut module_riter = path_tmp.rsplitn(2, "::");
let obj = module_riter.next().unwrap();
if let Some(module_path) = module_riter.next() {