Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix rustdoc (#12777)
Browse files Browse the repository at this point in the history
* Fix table formatting

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix sp-runtime-interface table

Using HTML now since multi-line tables are not a thing and fmt
destroys them.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More rustdoc fixes

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix tags

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More fixes...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Use Bastis patch

Co-authored-by: Bastian Köcher <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add more backticks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* change ci image

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: alvicsam <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2022
1 parent d122169 commit ab6142f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ variables:
CARGO_INCREMENTAL: 0
DOCKER_OS: "debian:stretch"
ARCH: "x86_64"
CI_IMAGE: "paritytech/ci-linux:production"
# staging image with rust 1.65 and nightly-2022-11-16
CI_IMAGE: "paritytech/ci-linux@sha256:786869e731963b3cc0a4aa9deb83367ed9e87a6ae48b6eb029d62b0cab4d87c1"
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27"
RUSTY_CACHIER_SINGLE_BRANCH: master
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"
Expand Down
6 changes: 3 additions & 3 deletions client/cli/src/params/shared_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ pub struct SharedParams {
#[arg(long, short = 'd', value_name = "PATH")]
pub base_path: Option<PathBuf>,

/// Sets a custom logging filter. Syntax is <target>=<level>, e.g. -lsync=debug.
/// Sets a custom logging filter. Syntax is `<target>=<level>`, e.g. -lsync=debug.
///
/// Log levels (least to most verbose) are error, warn, info, debug, and trace.
/// By default, all targets log `info`. The global log level can be set with -l<level>.
/// By default, all targets log `info`. The global log level can be set with `-l<level>`.
#[arg(short = 'l', long, value_name = "LOG_PATTERN", num_args = 1..)]
pub log: Vec<String>,

Expand All @@ -71,7 +71,7 @@ pub struct SharedParams {
#[arg(long)]
pub enable_log_reloading: bool,

/// Sets a custom profiling filter. Syntax is the same as for logging: <target>=<level>
/// Sets a custom profiling filter. Syntax is the same as for logging: `<target>=<level>`.
#[arg(long, value_name = "TARGETS")]
pub tracing_targets: Option<String>,

Expand Down
2 changes: 1 addition & 1 deletion frame/node-authorization/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! # Node authorization pallet
//!
//! This pallet manages a configurable set of nodes for a permissioned network.
//! Each node is dentified by a PeerId (i.e. Vec<u8>). It provides two ways to
//! Each node is dentified by a PeerId (i.e. `Vec<u8>`). It provides two ways to
//! authorize a node,
//!
//! - a set of well known nodes across different organizations in which the
Expand Down
18 changes: 10 additions & 8 deletions primitives/runtime-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Custom inner attributes are unstable, so we need to faky disable the attribute.
// rustfmt still honors the attribute to not format the rustdocs below.
#![cfg_attr(feature = "never", rustfmt::skip)]
//! Substrate runtime interface
//!
//! This crate provides types, traits and macros around runtime interfaces. A runtime interface is
Expand Down Expand Up @@ -94,14 +97,13 @@
//! | `&str` | `u64` | <code>v.len() 32bit << 32 &#124; v.as_ptr() 32bit</code> |
//! | `&[u8]` | `u64` | <code>v.len() 32bit << 32 &#124; v.as_ptr() 32bit</code> |
//! | `Vec<u8>` | `u64` | <code>v.len() 32bit << 32 &#124; v.as_ptr() 32bit</code> |
//! | `Vec<T> where T: Encode` | `u64` | `let e = v.encode();`<br><br><code>e.len() 32bit << 32
//! &#124; e.as_ptr() 32bit</code> | | `&[T] where T: Encode` | `u64` | `let e =
//! v.encode();`<br><br><code>e.len() 32bit << 32 &#124; e.as_ptr() 32bit</code> | | `[u8; N]` |
//! `u32` | `v.as_ptr()` | | `*const T` | `u32` | `Identity` |
//! | `Option<T>` | `u64` | `let e = v.encode();`<br><br><code>e.len() 32bit << 32 &#124; e.as_ptr()
//! 32bit</code> | | [`T where T: PassBy<PassBy=Inner>`](./pass_by#Inner) | Depends on inner |
//! Depends on inner | | [`T where T: PassBy<PassBy=Codec>`](./pass_by#Codec)|`u64`|<code>v.len()
//! 32bit << 32 &#124;v.as_ptr() 32bit</code>|
//! | `Vec<T> where T: Encode` | `u64` | `let e = v.encode();`<br><br><code>e.len() 32bit << 32 &#124; e.as_ptr() 32bit</code> |
//! | `&[T] where T: Encode` | `u64` | `let e = v.encode();`<br><br><code>e.len() 32bit << 32 &#124; e.as_ptr() 32bit</code> |
//! | `[u8; N]` | `u32` | `v.as_ptr()` |
//! | `*const T` | `u32` | `Identity` |
//! | `Option<T>` | `u64` | `let e = v.encode();`<br><br><code>e.len() 32bit << 32 &#124; e.as_ptr() 32bit</code> |
//! | [`T where T: PassBy<PassBy=Inner>`](./pass_by#Inner) | Depends on inner | Depends on inner |
//! | [`T where T: PassBy<PassBy=Codec>`](./pass_by#Codec)|`u64`|<code>v.len() 32bit << 32 &#124;v.as_ptr() 32bit</code>|
//!
//! `Identity` means that the value is converted directly into the corresponding FFI type.

Expand Down
2 changes: 1 addition & 1 deletion primitives/runtime-interface/test-wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub trait TestApi {
/// # Note
///
/// We return a `Vec<u32>` because this will use the code path that uses SCALE
/// to pass the data between native/wasm. (Vec<u8> is passed without encoding the
/// to pass the data between native/wasm. (`Vec<u8>` is passed without encoding the
/// data)
fn return_16kb() -> Vec<u32> {
vec![0; 4 * 1024]
Expand Down
2 changes: 1 addition & 1 deletion utils/frame/rpc/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl<V: FullCodec> StorageQuery<V> {

/// Send this query over RPC, await the typed result.
///
/// Hash should be <YourRuntime as frame::Config>::Hash.
/// Hash should be `<YourRuntime as frame::Config>::Hash`.
///
/// # Arguments
///
Expand Down

0 comments on commit ab6142f

Please sign in to comment.