]> git.bitcoin.ninja Git - rust-lightning/commitdiff
[bindings] Fix typo in opaque struct docs found by Val
authorMatt Corallo <git@bluematt.me>
Wed, 21 Oct 2020 18:44:55 +0000 (14:44 -0400)
committerMatt Corallo <git@bluematt.me>
Wed, 21 Oct 2020 18:54:51 +0000 (14:54 -0400)
c-bindings-gen/src/main.rs

index fed13f11c20a0b8e90c6899e93b939287dc76f9a..ecbd947baa8fb7dfd72231ee39b73716632842a2 100644 (file)
@@ -397,7 +397,7 @@ fn writeln_opaque<W: std::io::Write>(w: &mut W, ident: &syn::Ident, struct_name:
        writeln!(w, ";\n").unwrap();
        writeln!(extra_headers, "struct native{}Opaque;\ntypedef struct native{}Opaque LDKnative{};", ident, ident, ident).unwrap();
        writeln_docs(w, &attrs, "");
-       writeln!(w, "#[must_use]\n#[repr(C)]\npub struct {} {{\n\t/// Nearly everyhwere, inner must be non-null, however in places where", struct_name).unwrap();
+       writeln!(w, "#[must_use]\n#[repr(C)]\npub struct {} {{\n\t/// Nearly everywhere, inner must be non-null, however in places where", struct_name).unwrap();
        writeln!(w, "\t/// the Rust equivalent takes an Option, it may be set to null to indicate None.").unwrap();
        writeln!(w, "\tpub inner: *mut native{},\n\tpub is_owned: bool,\n}}\n", ident).unwrap();
        writeln!(w, "impl Drop for {} {{\n\tfn drop(&mut self) {{", struct_name).unwrap();