Skip to content

Commit

Permalink
Fix rendering of documentation on docs.rs (#807)
Browse files Browse the repository at this point in the history
* Fix rendering of documentation on docs.rs

* Add workflow to build docs on nightly (with same config as docs.rs)

* Update changelog

* Fix doc build errors and allow warnings in generated files

* Fix some more non-autolinks

* Fix more clippy warnings

* Formatting

* Fix last remaining comment
  • Loading branch information
romac committed Feb 10, 2021
1 parent df808c2 commit 7a4a85d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,18 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: "--cfg docsrs"
with:
command: doc
args: --all-features
4 changes: 3 additions & 1 deletion proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#![forbid(unsafe_code)]
#![doc(html_root_url = "https://docs.rs/tendermint-proto/0.18.0")]

// Built-in prost_types with slight customization to enable JSON-encoding
/// Built-in prost_types with slight customization to enable JSON-encoding
#[allow(warnings)]
pub mod google {
pub mod protobuf {
include!("prost/google.protobuf.rs");
Expand All @@ -14,6 +15,7 @@ pub mod google {
}
}

#[allow(warnings)]
mod tendermint;
pub use tendermint::*;

Expand Down
2 changes: 1 addition & 1 deletion proto/src/serializers/part_set_header_total.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! The deserializer is created for backwards compatibility: `total` was changed from a
//! string-quoted integer value into an integer value without quotes in Tendermint Core v0.34.0.
//! This deserializer allows backwards-compatibility by deserializing both ways.
//! See also: https://github.com/informalsystems/tendermint-rs/issues/679
//! See also: <https://github.com/informalsystems/tendermint-rs/issues/679>
use serde::{de::Error, de::Visitor, Deserializer, Serialize, Serializer};
use std::convert::TryFrom;
use std::fmt::Formatter;
Expand Down

0 comments on commit 7a4a85d

Please sign in to comment.