Skip to content

Commit 360b48b

Browse files
committed
fix a doctest
Signed-off-by: TennyZhuang <[email protected]>
1 parent abd5db3 commit 360b48b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

clippy_lints/src/partial_pub_fields.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ declare_clippy_lint! {
1818
/// ### Example
1919
/// ```rust
2020
/// pub struct Color {
21-
/// pub r,
22-
/// pub g,
23-
/// b,
21+
/// pub r: u8,
22+
/// pub g: u8,
23+
/// b: u8,
2424
/// }
2525
/// ```
2626
/// Use instead:
2727
/// ```rust
2828
/// pub struct Color {
29-
/// pub r,
30-
/// pub g,
31-
/// pub b,
29+
/// pub r: u8,
30+
/// pub g: u8,
31+
/// pub b: u8,
3232
/// }
3333
/// ```
3434
#[clippy::version = "1.66.0"]

src/docs/partial_pub_fields.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ interior invariants and expose intentionally limited API to the outside world.
1212
### Example
1313
```
1414
pub struct Color {
15-
pub r,
16-
pub g,
17-
b,
15+
pub r: u8,
16+
pub g: u8,
17+
b: u8,
1818
}
1919
```
2020
Use instead:
2121
```
2222
pub struct Color {
23-
pub r,
24-
pub g,
25-
pub b,
23+
pub r: u8,
24+
pub g: u8,
25+
pub b: u8,
2626
}
2727
```

0 commit comments

Comments
 (0)