Bladeren bron

Minor rustdoc corrections.

parazyd 4 jaren geleden
bovenliggende
commit
4c9570583e
5 gewijzigde bestanden met toevoegingen van 12 en 7 verwijderingen
  1. 5 1
      Makefile
  2. 3 3
      src/consensus/metadata.rs
  3. 2 1
      src/net/transport.rs
  4. 1 1
      src/rpc/server.rs
  5. 1 1
      src/runtime/vm_runtime.rs

+ 5 - 1
Makefile

@@ -39,6 +39,10 @@ fix: token_lists
 clippy: token_lists
 	RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) clippy --release --all-features --all
 
+rustdoc: token_lists
+	RUSTFLAGS="$(RUSTFLAGS)" $(CARGO) doc --release --workspace --all-features \
+		--no-deps --document-private-items
+
 # zkas source files which we want to compile for tests
 VM_SRC = proof/arithmetic.zk proof/mint.zk proof/burn.zk example/simple.zk
 VM_BIN = $(VM_SRC:=.bin)
@@ -65,4 +69,4 @@ uninstall:
 		rm -f $(DESTDIR)$(PREFIX)/bin/$$i; \
 	done;
 
-.PHONY: all check fix clippy test test-tx clean install uninstall
+.PHONY: all check fix clippy rustdoc test test-tx clean install uninstall

+ 3 - 3
src/consensus/metadata.rs

@@ -4,7 +4,7 @@ use crate::util::{
     time::Timestamp,
 };
 
-/// This struct represents additional [`Block`] information used by
+/// This struct represents additional [`Block`](super::Block) information used by
 /// the consensus protocol
 #[derive(Debug, Clone, PartialEq, SerialEncodable, SerialDecodable)]
 pub struct Metadata {
@@ -20,7 +20,7 @@ impl Metadata {
     }
 }
 
-/// This struct represents [`Block`] information used by the Ouroboros
+/// This struct represents [`Block`](super::Block) information used by the Ouroboros
 /// Praos consensus protocol.
 #[derive(Debug, Clone, PartialEq, SerialEncodable, SerialDecodable)]
 pub struct OuroborosMetadata {
@@ -38,7 +38,7 @@ impl OuroborosMetadata {
     }
 }
 
-/// This struct represents [`Block`] information used by the Streamlet
+/// This struct represents [`Block`](super::Block) information used by the Streamlet
 /// consensus protocol.
 #[derive(Debug, Clone, SerialEncodable, SerialDecodable)]
 pub struct StreamletMetadata {

+ 2 - 1
src/net/transport.rs

@@ -63,7 +63,8 @@ impl TryFrom<Url> for TransportName {
 
 /// The `Transport` trait serves as a base for implementing transport protocols.
 /// Base transports can optionally be upgraded with TLS in order to support encryption.
-/// The implementation of our TLS authentication can be found in the [`upgrade_tls`] module.
+/// The implementation of our TLS authentication can be found in the
+/// [`upgrade_tls`](TlsUpgrade) module.
 pub trait Transport {
     type Acceptor;
     type Connector;

+ 1 - 1
src/rpc/server.rs

@@ -72,7 +72,7 @@ async fn accept(
     Ok(())
 }
 
-/// Wrapper function around [`accept`] to take the incoming connection and
+/// Wrapper function around [`accept()`] to take the incoming connection and
 /// pass it forward.
 async fn run_accept_loop(
     listener: Box<dyn TransportListener>,

+ 1 - 1
src/runtime/vm_runtime.rs

@@ -92,7 +92,7 @@ impl Runtime {
         Ok(Self { instance, env })
     }
 
-    /// Run the hardcoded [ENTRYPOINT] function with the given payload as input.
+    /// Run the hardcoded `ENTRYPOINT` function with the given payload as input.
     pub fn run(&mut self, payload: &[u8]) -> Result<()> {
         // Get module linear memory
         let memory = self.memory()?;