From 256c1bc9b9472c7e13082fcd91a2cebc41bfde27 Mon Sep 17 00:00:00 2001 From: yanganto Date: Thu, 9 Jan 2020 16:52:10 +0800 Subject: [PATCH] Fix documentation - fix document generate script in README - tab format in Cargo.toml at root - fix cli doc string with correct crate name --- Cargo.toml | 6 +++--- README.adoc | 13 ++++++++----- node/cli/bin/main.rs | 2 +- node/cli/src/lib.rs | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4235f09e7..42b68987d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,14 +3,14 @@ panic = 'unwind' [workspace] members = [ - "core/cli", - "core/ethash", + "core/cli", + "core/ethash", # "core/merkle-mountain-range", # "core/fly-client", "core/sr-eth-primitives", "core/merkle-patricia-trie", - "node/cli", + "node/cli", "node/executor", "node/primitives", "node/rpc", diff --git a/README.adoc b/README.adoc index b12cba122..2aa5926fc 100644 --- a/README.adoc +++ b/README.adoc @@ -316,18 +316,21 @@ curl -H 'Content-Type: application/json' --data '{ "jsonrpc":"2.0", "method":"au You can generate documentation for a Darwinia Rust package and have it automatically open in your web browser using https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html#using-rustdoc-with-cargo[rustdoc with Cargo], (of the The Rustdoc Book), by running the following command: +``` +cargo doc --open +``` + +If you just want to generate document from specific package, you may use following command: + ``` cargo doc --package --open ``` -Replacing `` with one of the following (i.e. `cargo doc --package darwinia --open`): +Replacing `` with one of the following (i.e. `cargo doc --package darwinia-cli --open`): -* All Darwinia Packages -[source, shell] -darwinia * Darwinia Core [source, shell] -darwinia, darwinia-cli, ethash, fly-client, +darwinia-cli, ethash, fly-client, merkle-mountain-range, merkle-patricia-trie, sr-eth-primitives * Darwinia Runtime Module Library [source, shell] diff --git a/node/cli/bin/main.rs b/node/cli/bin/main.rs index 4ce38527f..9e4947d79 100644 --- a/node/cli/bin/main.rs +++ b/node/cli/bin/main.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Substrate Node CLI +//! Darwinia #![warn(missing_docs)] diff --git a/node/cli/src/lib.rs b/node/cli/src/lib.rs index cc2b995db..26e39c30b 100644 --- a/node/cli/src/lib.rs +++ b/node/cli/src/lib.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Substrate. If not, see . -//! Substrate CLI library. +//! Darwinia CLI library. #![warn(missing_docs)] #![warn(unused_extern_crates)]