mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 13:13:40 +00:00
feat: rename variable in example
This commit is contained in:
parent
4493fc7d27
commit
17ff85081d
@ -19,7 +19,7 @@ declare_clippy_lint! {
|
||||
/// // Result
|
||||
/// # type Error = &'static str;
|
||||
/// # let result: Result<&str, Error> = Err("error");
|
||||
/// let port = result.or::<Error>(Ok(fallback)).unwrap();
|
||||
/// let value = result.or::<Error>(Ok(fallback)).unwrap();
|
||||
///
|
||||
/// // Option
|
||||
/// # let option: Option<&str> = None;
|
||||
@ -30,7 +30,7 @@ declare_clippy_lint! {
|
||||
/// # let fallback = "fallback";
|
||||
/// // Result
|
||||
/// # let result: Result<&str, &str> = Err("error");
|
||||
/// let port = result.unwrap_or(fallback);
|
||||
/// let value = result.unwrap_or(fallback);
|
||||
///
|
||||
/// // Option
|
||||
/// # let option: Option<&str> = None;
|
||||
|
Loading…
Reference in New Issue
Block a user