diff rust/hg-cpython/src/lib.rs @ 41184:dcf818267bc1

rust-cpython: rustdoc improvements By default, `cargo doc` builds the documentation for public constructs only, so we make public those that can. Since `cindex` is not safe, we keep it private. Unfortunately, the macro syntax of rust-cpython doesn't allow us to document the classes directly, so we resort to do that at the module level. Differential Revision: https://phab.mercurial-scm.org/D5546
author Georges Racinet <georges.racinet@octobus.net>
date Sat, 22 Dec 2018 11:38:03 +0100
parents d43719bd01f0
children ff333620a4cc
line wrap: on
line diff
--- a/rust/hg-cpython/src/lib.rs	Thu Jan 10 10:23:22 2019 -0500
+++ b/rust/hg-cpython/src/lib.rs	Sat Dec 22 11:38:03 2018 +0100
@@ -12,7 +12,8 @@
 //! it behaves as the `cext` package.
 //!
 //! Example:
-//! ```
+//!
+//! ```text
 //! >>> from mercurial.rustext import ancestor
 //! >>> ancestor.__doc__
 //! 'Generic DAG ancestor algorithms - Rust implementation'
@@ -23,9 +24,9 @@
 extern crate hg;
 extern crate libc;
 
-mod ancestors;
+pub mod ancestors;
 mod cindex;
-mod exceptions;
+pub mod exceptions;
 
 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| {
     m.add(