From 360b48b1ab97471c0d122732a027b65f46980447 Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Sun, 16 Oct 2022 17:10:27 +0800 Subject: [PATCH] fix a doctest Signed-off-by: TennyZhuang --- clippy_lints/src/partial_pub_fields.rs | 12 ++++++------ src/docs/partial_pub_fields.txt | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/clippy_lints/src/partial_pub_fields.rs b/clippy_lints/src/partial_pub_fields.rs index 42f892e36..f60d9d65b 100644 --- a/clippy_lints/src/partial_pub_fields.rs +++ b/clippy_lints/src/partial_pub_fields.rs @@ -18,17 +18,17 @@ declare_clippy_lint! { /// ### Example /// ```rust /// pub struct Color { - /// pub r, - /// pub g, - /// b, + /// pub r: u8, + /// pub g: u8, + /// b: u8, /// } /// ``` /// Use instead: /// ```rust /// pub struct Color { - /// pub r, - /// pub g, - /// pub b, + /// pub r: u8, + /// pub g: u8, + /// pub b: u8, /// } /// ``` #[clippy::version = "1.66.0"] diff --git a/src/docs/partial_pub_fields.txt b/src/docs/partial_pub_fields.txt index a332ec8c2..b529adf15 100644 --- a/src/docs/partial_pub_fields.txt +++ b/src/docs/partial_pub_fields.txt @@ -12,16 +12,16 @@ interior invariants and expose intentionally limited API to the outside world. ### Example ``` pub struct Color { - pub r, - pub g, - b, + pub r: u8, + pub g: u8, + b: u8, } ``` Use instead: ``` pub struct Color { - pub r, - pub g, - pub b, + pub r: u8, + pub g: u8, + pub b: u8, } ``` \ No newline at end of file