瀏覽代碼

rustdoc lints

parazyd 3 年之前
父節點
當前提交
fe11151ba9
共有 5 個文件被更改,包括 12 次插入12 次删除
  1. 1 1
      bin/zkas/src/main.rs
  2. 2 2
      src/net/settings.rs
  3. 4 4
      src/runtime/vm_runtime.rs
  4. 1 1
      src/sdk/src/crypto/mimc_vdf.rs
  5. 4 4
      src/wallet/walletdb.rs

+ 1 - 1
bin/zkas/src/main.rs

@@ -32,7 +32,7 @@ use darkfi::{
 #[derive(clap::Parser)]
 #[clap(name = "zkas", about = cli_desc!(), version)]
 struct Args {
-    /// Place the output into <FILE>
+    /// Place the output into `<FILE>`
     #[clap(short = 'o', value_name = "FILE")]
     output: Option<String>,
 

+ 2 - 2
src/net/settings.rs

@@ -202,8 +202,8 @@ impl From<SettingsOpt> for Settings {
     }
 }
 
-/// Auxiliary function to convert outbound transport Vec<String>
-/// to Vec<TransportName>, using defaults if empty.
+/// Auxiliary function to convert outbound transport `Vec<String>`
+/// to `Vec<TransportName>`, using defaults if empty.
 pub fn get_outbound_transports(opt_outbound_transports: Vec<String>) -> Vec<TransportName> {
     let mut outbound_transports = vec![];
     for transport in opt_outbound_transports {

+ 4 - 4
src/runtime/vm_runtime.rs

@@ -319,7 +319,7 @@ impl Runtime {
     }
 
     /// This function runs when a smart contract is initially deployed, or re-deployed.
-    /// The runtime will look for an [`INITIALIZE`] symbol in the wasm code, and execute
+    /// The runtime will look for an `INITIALIZE` symbol in the wasm code, and execute
     /// it if found. Optionally, it is possible to pass in a payload for any kind of special
     /// instructions the developer wants to manage in the initialize function.
     /// This process is supposed to set up the sled db trees for storing the smart contract
@@ -347,7 +347,7 @@ impl Runtime {
     }
 
     /// This funcion runs when someone wants to execute a smart contract.
-    /// The runtime will look for an [`ENTRYPOINT`] symbol in the wasm code, and
+    /// The runtime will look for an `ENTRYPOINT` symbol in the wasm code, and
     /// execute it if found. A payload is also passed as an instruction that can
     /// be used inside the vm by the runtime.
     pub fn exec(&mut self, payload: &[u8]) -> Result<Vec<u8>> {
@@ -355,9 +355,9 @@ impl Runtime {
         self.call(ContractSection::Exec, payload)
     }
 
-    /// This function runs after successful execution of [`exec`] and tries to
+    /// This function runs after successful execution of `exec` and tries to
     /// apply the state change to the sled databases.
-    /// The runtime will lok for an [`UPDATE`] symbol in the wasm code, and execute
+    /// The runtime will lok for an `UPDATE` symbol in the wasm code, and execute
     /// it if found. The function does not take an arbitrary payload, but just takes
     /// a state update from `env` and passes it into the wasm runtime.
     pub fn apply(&mut self, update: &[u8]) -> Result<()> {

+ 1 - 1
src/sdk/src/crypto/mimc_vdf.rs

@@ -16,7 +16,7 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
-//! https://vitalik.ca/general/2018/07/21/starks_part_3.html
+//! <https://vitalik.ca/general/2018/07/21/starks_part_3.html>
 
 use num_bigint::BigUint;
 use num_traits::Num;

+ 4 - 4
src/wallet/walletdb.rs

@@ -40,13 +40,13 @@ pub async fn init_wallet(wallet_path: &str, wallet_pass: &str) -> Result<WalletP
 /// Types we want to allow to query from the SQL wallet
 #[repr(u8)]
 pub enum QueryType {
-    /// Integer gets decoded into u64
+    /// Integer gets decoded into `u64`
     Integer = 0x00,
-    /// Blob gets decoded into Vec<u8>
+    /// Blob gets decoded into `Vec<u8>`
     Blob = 0x01,
-    /// OptionInteger gets decoded into Option<u64>
+    /// OptionInteger gets decoded into `Option<u64>`
     OptionInteger = 0x02,
-    /// OptionBlob gets decoded into Option<Vec<u8>>
+    /// OptionBlob gets decoded into `Option<Vec<u8>>`
     OptionBlob = 0x03,
     /// Last type, increment this when you add new types.
     Last = 0x04,