Skip to content

Commit 80812b4

Browse files
ggwpezbkchralvicsam
authored andcommitted
Fix rustdoc (paritytech#12777)
* Fix table formatting Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * 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 <oliver.tale-yazdi@parity.io> * More rustdoc fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tags Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * More fixes... Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use Bastis patch Co-authored-by: Bastian Köcher <git@kchr.de> Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add more backticks Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * change ci image Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: alvicsam <alvicsam@gmail.com>
1 parent 57acd48 commit 80812b4

6 files changed

Lines changed: 18 additions & 15 deletions

File tree

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ variables:
4747
CARGO_INCREMENTAL: 0
4848
DOCKER_OS: "debian:stretch"
4949
ARCH: "x86_64"
50-
CI_IMAGE: "paritytech/ci-linux:production"
50+
# staging image with rust 1.65 and nightly-2022-11-16
51+
CI_IMAGE: "paritytech/ci-linux@sha256:786869e731963b3cc0a4aa9deb83367ed9e87a6ae48b6eb029d62b0cab4d87c1"
5152
BUILDAH_IMAGE: "quay.io/buildah/stable:v1.27"
5253
RUSTY_CACHIER_SINGLE_BRANCH: master
5354
RUSTY_CACHIER_DONT_OPERATE_ON_MAIN_BRANCH: "true"

client/cli/src/params/shared_params.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ pub struct SharedParams {
4242
#[arg(long, short = 'd', value_name = "PATH")]
4343
pub base_path: Option<PathBuf>,
4444

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

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

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

frame/node-authorization/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
//! # Node authorization pallet
1919
//!
2020
//! This pallet manages a configurable set of nodes for a permissioned network.
21-
//! Each node is dentified by a PeerId (i.e. Vec<u8>). It provides two ways to
21+
//! Each node is dentified by a PeerId (i.e. `Vec<u8>`). It provides two ways to
2222
//! authorize a node,
2323
//!
2424
//! - a set of well known nodes across different organizations in which the

primitives/runtime-interface/src/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

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

primitives/runtime-interface/test-wasm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub trait TestApi {
5454
/// # Note
5555
///
5656
/// We return a `Vec<u32>` because this will use the code path that uses SCALE
57-
/// to pass the data between native/wasm. (Vec<u8> is passed without encoding the
57+
/// to pass the data between native/wasm. (`Vec<u8>` is passed without encoding the
5858
/// data)
5959
fn return_16kb() -> Vec<u32> {
6060
vec![0; 4 * 1024]

utils/frame/rpc/support/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl<V: FullCodec> StorageQuery<V> {
164164

165165
/// Send this query over RPC, await the typed result.
166166
///
167-
/// Hash should be <YourRuntime as frame::Config>::Hash.
167+
/// Hash should be `<YourRuntime as frame::Config>::Hash`.
168168
///
169169
/// # Arguments
170170
///

0 commit comments

Comments
 (0)