]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Make c_types module pub as its contents are exposed to C
authorMatt Corallo <git@bluematt.me>
Mon, 29 Mar 2021 17:50:42 +0000 (13:50 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 30 Mar 2021 02:56:44 +0000 (22:56 -0400)
This makes our `[deny(missing_docs)]` annotation effective

c-bindings-gen/src/main.rs

index dfbcb85192435f8e3226752c249194a1495ff756..1d37bb2b6335c4a538511b13345d5f01be36a5bc 100644 (file)
@@ -1374,8 +1374,8 @@ fn convert_file<'a, 'b>(libast: &'a FullLibraryAST, crate_types: &mut CrateTypes
                        writeln!(out, "#![allow(unused_unsafe)]").unwrap();
                        writeln!(out, "#![allow(unused_braces)]").unwrap();
                        writeln!(out, "#![deny(missing_docs)]").unwrap();
-                       writeln!(out, "mod c_types;").unwrap();
-                       writeln!(out, "mod bitcoin;").unwrap();
+                       writeln!(out, "pub mod c_types;").unwrap();
+                       writeln!(out, "pub mod bitcoin;").unwrap();
                } else {
                        writeln!(out, "\nuse std::ffi::c_void;\nuse bitcoin::hashes::Hash;\nuse crate::c_types::*;\n").unwrap();
                }