Small fixes of doc in needless_question_mark

This commit is contained in:
Takayuki Nakata 2021-01-08 08:45:15 +09:00
parent e15bef9d3f
commit aa9adbf244

View File

@ -14,7 +14,7 @@
/// **What it does:**
/// Suggests alternatives for useless applications of `?` in terminating expressions
///
/// **Why is this bad?** There's no reason to use ? to short-circuit when execution of the body will end there anyway.
/// **Why is this bad?** There's no reason to use `?` to short-circuit when execution of the body will end there anyway.
///
/// **Known problems:** None.
///
@ -58,7 +58,7 @@
/// ```
pub NEEDLESS_QUESTION_MARK,
complexity,
"Suggest value.inner_option instead of Some(value.inner_option?). The same goes for Result<T, E>."
"Suggest `value.inner_option` instead of `Some(value.inner_option?)`. The same goes for `Result<T, E>`."
}
const NEEDLESS_QUESTION_MARK_RESULT_MSRV: RustcVersion = RustcVersion::new(1, 13, 0);