Repository: informalsystems/tendermint-rs (language: rust)

Issue:
docs: Build fails
For the current docs on `main`, the documentation build fails, as per https://github.com/informalsystems/tendermint-rs/actions/runs/3236423129/jobs/5302211119 (ref: #1209).

Seems to be due to new checks in nightly.


Discussion / hints:

Fix patch:
diff --git a/proto/src/serializers.rs b/proto/src/serializers.rs
index d94281e20..651a197f6 100644
--- a/proto/src/serializers.rs
+++ b/proto/src/serializers.rs
@@ -9,7 +9,7 @@
 //! All serializers are presented in a serializers::<Rust_nickname>::<JSON_representation_name>
 //! format.
 //!
-//! This example shows how to serialize Vec<u8> into different types of strings:
+//! This example shows how to serialize `Vec<u8>` into different types of strings:
 //! ```ignore
 //! use serde::{Serialize, Deserialize};
 //! use crate::serializers;
diff --git a/proto/src/serializers/bytes.rs b/proto/src/serializers/bytes.rs
index 5b6a32d8b..d5aa786d9 100644
--- a/proto/src/serializers/bytes.rs
+++ b/proto/src/serializers/bytes.rs
@@ -1,4 +1,4 @@
-//! Serialize/deserialize bytes (Vec<u8>) type
+//! Serialize/deserialize bytes (`Vec<u8>`) type
 
 /// Serialize into hexstring, deserialize from hexstring
 pub mod hexstring {
@@ -7,7 +7,7 @@ pub mod hexstring {
 
     use crate::prelude::*;
 
-    /// Deserialize hexstring into Vec<u8>
+    /// Deserialize hexstring into `Vec<u8>`
     pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
     where
         D: Deserializer<'de>,
@@ -18,7 +18,7 @@ pub mod hexstring {
             .map_err(serde::de::Error::custom)
     }
 
-    /// Serialize from T into hexstring
+    /// Serialize from `T` into hexstring
     pub fn serialize<S, T>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
@@ -37,7 +37,7 @@ pub mod base64string {
 
     use crate::prelude::*;
 
-    /// Deserialize base64string into Vec<u8>
+    /// Deserialize base64string into `Vec<u8>`
     pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
     where
         D: Deserializer<'de>,
@@ -68,14 +68,14 @@ pub mod base64string {
     }
 }
 
-/// Serialize into Vec<base64string>, deserialize from Vec<base64string>
+/// Serialize into `Vec<base64string>`, deserialize from `Vec<base64string>`
 pub mod vec_base64string {
     use serde::{Deserialize, Deserializer, Serializer};
     use subtle_encoding::base64;
 
     use crate::prelude::*;
 
-    /// Deserialize array into Vec<Vec<u8>>
+    /// Deserialize array into `Vec<Vec<u8>>`
     pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<Vec<u8>>, D::Error>
     where
         D: Deserializer<'de>,
@@ -87,7 +87,7 @@ pub mod vec_base64string {
             .collect()
     }
 
-    /// Serialize from Vec<T> into Vec<base64string>
+    /// Serialize from `Vec<T>` into `Vec<base64string>`
     pub fn serialize<S, T>(value: &[T], serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
@@ -103,14 +103,14 @@ pub mod vec_base64string {
     }
 }
 
-/// Serialize into Option<base64string>, deserialize from Option<base64string>
+/// Serialize into `Option<base64string>`, deserialize from `Option<base64string>`
 pub mod option_base64string {
     use serde::{Deserialize, Deserializer, Serializer};
     use subtle_encoding::base64;
 
     use crate::prelude::*;
 
-    /// Deserialize Option<base64string> into Vec<u8> or null
+    /// Deserialize `Option<base64string>` into `Vec<u8>` or null
     pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
     where
         D: Deserializer<'de>,
@@ -119,7 +119,7 @@ pub mod option_base64string {
         base64::decode(&string).map_err(serde::de::Error::custom)
     }
 
-    /// Serialize from T into Option<base64string>
+    /// Serialize from `T` into `Option<base64string>`
     pub fn serialize<S, T>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
     where
         S: Serializer,
@@ -137,7 +137,7 @@ pub mod string {
 
     use crate::prelude::*;
 
-    /// Deserialize string into Vec<u8>
+    /// Deserialize string into `Vec<u8>`
     #[allow(dead_code)]
     pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<u8>, D::Error>
     where
@@ -147,7 +147,7 @@ pub mod string {
         Ok(string.as_bytes().to_vec())
     }
 
-    /// Serialize from T into string
+    /// Serialize from `T` into string
     #[allow(dead_code)]
     pub fn serialize<S, T>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
     where
diff --git a/proto/src/serializers/nullable.rs b/proto/src/serializers/nullable.rs
index cf708482b..d03d7ad94 100644
--- a/proto/src/serializers/nullable.rs
+++ b/proto/src/serializers/nullable.rs
@@ -1,7 +1,7 @@
-//! Serialize/deserialize `nil`able type into T, where nil turns into the default impl.
+//! Serialize/deserialize `nil`able type into `T`, where `nil` turns into the default impl.
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 
-/// Deserialize Option<T>
+/// Deserialize `Option<T>`
 pub fn deserialize<'de, D, T>(deserializer: D) -> Result<T, D::Error>
 where
     D: Deserializer<'de>,
@@ -10,7 +10,7 @@ where
     Ok(Option::<T>::deserialize(deserializer)?.unwrap_or_default())
 }
 
-/// Serialize Option<T>
+/// Serialize `Option<T>`
 pub fn serialize<S, T>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
 where
     S: Serializer,
diff --git a/proto/src/serializers/optional.rs b/proto/src/serializers/optional.rs
index a91cba6a6..5fce9b181 100644
--- a/proto/src/serializers/optional.rs
+++ b/proto/src/serializers/optional.rs
@@ -1,9 +1,9 @@
-//! Serialize/deserialize Option<T> type where T has a serializer/deserializer.
-//! Use `null` if the received value equals the Default implementation.
+//! Serialize/deserialize `Option<T>` type where `T` has a serializer/deserializer.
+//! Use `null` if the received value equals the `Default` implementation.
 // Todo: Rename this serializer to something like "default_eq_none" to mirror its purpose better.
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 
-/// Deserialize Option<T>
+/// Deserialize `Option<T>`
 pub fn deserialize<'de, D, T>(deserializer: D) -> Result<Option<T>, D::Error>
 where
     D: Deserializer<'de>,
@@ -12,7 +12,7 @@ where
     Ok(Option::<T>::deserialize(deserializer)?.filter(|t| t != &T::default()))
 }
 
-/// Serialize Option<T>
+/// Serialize `Option<T>`
 pub fn serialize<S, T>(value: &Option<T>, serializer: S) -> Result<S::Ok, S::Error>
 where
     S: Serializer,
diff --git a/proto/src/serializers/txs.rs b/proto/src/serializers/txs.rs
index b8cc42853..fb5d46f54 100644
--- a/proto/src/serializers/txs.rs
+++ b/proto/src/serializers/txs.rs
@@ -1,10 +1,10 @@
-//! Serialize/deserialize Vec<Vec<u8>> type from and into transactions (Base64String array).
+//! Serialize/deserialize `Vec<Vec<u8>>` type from and into transactions (Base64String array).
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 use subtle_encoding::base64;
 
 use crate::prelude::*;
 
-/// Deserialize transactions into Vec<Vec<u8>>
+/// Deserialize transactions into `Vec<Vec<u8>>`
 pub fn deserialize<'de, D>(deserializer: D) -> Result<Vec<Vec<u8>>, D::Error>
 where
     D: Deserializer<'de>,
@@ -23,7 +23,7 @@ where
         .collect()
 }
 
-/// Serialize from Vec<Vec<u8>> into transactions
+/// Serialize from `Vec<Vec<u8>>` into transactions
 pub fn serialize<S>(value: &[Vec<u8>], serializer: S) -> Result<S::Ok, S::Error>
 where
     S: Serializer,
diff --git a/tendermint/src/hash.rs b/tendermint/src/hash.rs
index 17de5c533..7f7bc2f64 100644
--- a/tendermint/src/hash.rs
+++ b/tendermint/src/hash.rs
@@ -33,7 +33,7 @@ pub enum Hash {
 
 impl Protobuf<Vec<u8>> for Hash {}
 
-/// Default conversion from Vec<u8> is SHA256 Hash or None
+/// Default conversion from `Vec<u8>` is SHA256 Hash or `None`
 impl TryFrom<Vec<u8>> for Hash {
     type Error = Error;
 
@@ -207,7 +207,7 @@ impl From<AppHash> for Vec<u8> {
 }
 
 impl AppHash {
-    /// Return AppHash value as vec<u8>
+    /// Return AppHash value as `Vec<u8>`
     pub fn value(&self) -> Vec<u8> {
         self.0.clone()
     }
diff --git a/tendermint/src/serializers/option_hash.rs b/tendermint/src/serializers/option_hash.rs
index 82cdc67ef..20d2cf633 100644
--- a/tendermint/src/serializers/option_hash.rs
+++ b/tendermint/src/serializers/option_hash.rs
@@ -1,11 +1,11 @@
-//! Option<Hash> serialization with validation
+//! `Option<Hash>` serialization with validation
 
 use serde::{Deserializer, Serializer};
 
 use super::hash;
 use crate::Hash;
 
-/// Deserialize hexstring into Option<Hash>
+/// Deserialize hexstring into `Option<Hash>`
 pub fn deserialize<'de, D>(deserializer: D) -> Result<Option<Hash>, D::Error>
 where
     D: Deserializer<'de>,
@@ -13,7 +13,7 @@ where
     hash::deserialize(deserializer).map(Some)
 }
 
-/// Serialize from Option<Hash> into hexstring
+/// Serialize from `Option<Hash>` into hexstring
 pub fn serialize<S>(value: &Option<Hash>, serializer: S) -> Result<S::Ok, S::Error>
 where
     S: Serializer,


Test patch: