mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-13 00:17:13 +00:00
fix a doctest
Signed-off-by: TennyZhuang <zty0826@gmail.com>
This commit is contained in:
parent
abd5db3321
commit
360b48b1ab
2 changed files with 12 additions and 12 deletions
|
@ -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"]
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
```
|
Loading…
Reference in a new issue