Fix code formatting for more lints
This commit is contained in:
parent
f0dc98160b
commit
58da5ba6db
@ -114,7 +114,7 @@
|
|||||||
///
|
///
|
||||||
/// Better:
|
/// Better:
|
||||||
///
|
///
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// let opt = Some(1);
|
/// let opt = Some(1);
|
||||||
/// opt?;
|
/// opt?;
|
||||||
/// # Some::<()>(())
|
/// # Some::<()>(())
|
||||||
@ -168,7 +168,7 @@
|
|||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// struct X;
|
/// struct X;
|
||||||
/// impl X {
|
/// impl X {
|
||||||
/// fn add(&self, other: &X) -> X {
|
/// fn add(&self, other: &X) -> X {
|
||||||
@ -200,7 +200,7 @@
|
|||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// impl X {
|
/// impl X {
|
||||||
/// fn as_str(self) -> &str {
|
/// fn as_str(self) -> &str {
|
||||||
/// ..
|
/// ..
|
||||||
@ -245,7 +245,7 @@
|
|||||||
/// **Known problems:** The error type needs to implement `Debug`
|
/// **Known problems:** The error type needs to implement `Debug`
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// x.ok().expect("why did I do this again?")
|
/// x.ok().expect("why did I do this again?")
|
||||||
/// ```
|
/// ```
|
||||||
pub OK_EXPECT,
|
pub OK_EXPECT,
|
||||||
@ -318,7 +318,7 @@
|
|||||||
/// **Known problems:** The order of the arguments is not in execution order.
|
/// **Known problems:** The order of the arguments is not in execution order.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// opt.map_or(None, |a| a + 1)
|
/// opt.map_or(None, |a| a + 1)
|
||||||
/// ```
|
/// ```
|
||||||
pub OPTION_MAP_OR_NONE,
|
pub OPTION_MAP_OR_NONE,
|
||||||
@ -707,7 +707,7 @@
|
|||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// impl Foo {
|
/// impl Foo {
|
||||||
/// fn new(..) -> NotAFoo {
|
/// fn new(..) -> NotAFoo {
|
||||||
/// }
|
/// }
|
||||||
@ -771,7 +771,7 @@
|
|||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```should_panic
|
/// ```rust,should_panic
|
||||||
/// for x in (0..100).step_by(0) {
|
/// for x in (0..100).step_by(0) {
|
||||||
/// //..
|
/// //..
|
||||||
/// }
|
/// }
|
||||||
@ -953,7 +953,7 @@
|
|||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// name.chars().last() == Some('_') || name.chars().next_back() == Some('-')
|
/// name.chars().last() == Some('_') || name.chars().next_back() == Some('-')
|
||||||
/// ```
|
/// ```
|
||||||
pub CHARS_LAST_CMP,
|
pub CHARS_LAST_CMP,
|
||||||
@ -1147,7 +1147,7 @@
|
|||||||
/// **Known problems:** None
|
/// **Known problems:** None
|
||||||
///
|
///
|
||||||
/// **Example:**
|
/// **Example:**
|
||||||
/// ```ignore
|
/// ```rust,ignore
|
||||||
/// unsafe { (&() as *const ()).offset(1) };
|
/// unsafe { (&() as *const ()).offset(1) };
|
||||||
/// ```
|
/// ```
|
||||||
pub ZST_OFFSET,
|
pub ZST_OFFSET,
|
||||||
|
Loading…
Reference in New Issue
Block a user