From e74c22a121af31ca54e57d6e420ef770a299d7f4 Mon Sep 17 00:00:00 2001
From: Yaroslav Dynnikov <y.dynnikov@picodata.io>
Date: Tue, 11 Jul 2023 18:17:15 +0000
Subject: [PATCH] doc: picodata run --script option description

Also fix some rustdoc warnings
---
 src/args.rs    | 7 +++++--
 src/cas.rs     | 9 +++++----
 src/storage.rs | 1 +
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/args.rs b/src/args.rs
index 68d1955acb..a4db68e747 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -122,7 +122,10 @@ pub struct Run {
         env = "PICODATA_SCRIPT",
         parse(try_from_str = try_parse_path)
     )]
-    /// A path to a lua script that will be executed at postjoin stage
+    /// A path to a lua script that will be executed at postjoin stage.
+    /// At the moment the script is executed, the local storage is
+    /// already initialized and HTTP server is running (if specified).
+    /// But the raft node is uninitialized yet.
     pub script: Option<String>,
 
     #[clap(long, value_name = "[host][:port]", env = "PICODATA_HTTP_LISTEN")]
@@ -321,7 +324,7 @@ pub struct Connect {
     pub user: String,
 
     #[clap(value_name = "ADDRESS")]
-    /// Picodata instance address. Format: [user@][host][:port]
+    /// Picodata instance address. Format: `[user@][host][:port]`
     pub address: Address,
 }
 
diff --git a/src/cas.rs b/src/cas.rs
index 2ffb075339..21c654daff 100644
--- a/src/cas.rs
+++ b/src/cas.rs
@@ -38,12 +38,13 @@ const PROHIBITED_SPACES: &[ClusterwideSpaceId] = &[
 
 /// Performs a clusterwide compare and swap operation.
 ///
-/// E.g. it checks the `predicate` on leader and if no conflicting entries were found
-/// appends the `op` to the raft log and returns its index and term.
+/// E.g. it checks the `predicate` on leader and if no conflicting
+/// entries were found appends the `op` to the raft log and returns its
+/// index and term.
 ///
 /// # Errors
-/// See [`rpc::cas::Error`] for CaS-specific errors.
-/// It can also return general picodata errors in cases of faulty network or storage.
+/// See [`cas::Error`][Error] for CaS-specific errors. It can also return
+/// general picodata errors in cases of faulty network or storage.
 pub fn compare_and_swap(op: Op, predicate: Predicate) -> traft::Result<(RaftIndex, RaftTerm)> {
     let node = node::global()?;
     let request = Request {
diff --git a/src/storage.rs b/src/storage.rs
index 306cb13802..e0066139a7 100644
--- a/src/storage.rs
+++ b/src/storage.rs
@@ -580,6 +580,7 @@ impl Clusterwide {
     ///
     /// This should be called within a transaction.
     ///
+    #[allow(rustdoc::private_intra_doc_links)]
     /// [`NodeImpl::advance`]: crate::traft::node::NodeImpl::advance
     pub fn apply_snapshot_data(&self, data: &SnapshotData, is_master: bool) -> Result<()> {
         debug_assert!(unsafe { ::tarantool::ffi::tarantool::box_txn() });
-- 
GitLab