Skip to content

Remove use of try! from documentation #4990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ declare_clippy_lint! {
///
/// **Why is this bad?** `result.unwrap()` will let the thread panic on `Err`
/// values. Normally, you want to implement more sophisticated error handling,
/// and propagate errors upwards with `try!`.
/// and propagate errors upwards with `?` operator.
///
/// Even if you want to panic on errors, not all `Error`s implement good
/// messages on display. Therefore, it may be beneficial to look at the places
Expand Down Expand Up @@ -127,7 +127,7 @@ declare_clippy_lint! {
///
/// **Why is this bad?** `result.expect()` will let the thread panic on `Err`
/// values. Normally, you want to implement more sophisticated error handling,
/// and propagate errors upwards with `try!`.
/// and propagate errors upwards with `?` operator.
///
/// **Known problems:** None.
///
Expand Down
12 changes: 6 additions & 6 deletions clippy_lints/src/ok_if_let.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ declare_clippy_lint! {
///
/// **Example:**
/// ```ignore
/// for result in iter {
/// if let Some(bench) = try!(result).parse().ok() {
/// vec.push(bench)
/// for i in iter {
/// if let Some(value) = i.parse().ok() {
/// vec.push(value)
/// }
/// }
/// ```
/// Could be written:
///
/// ```ignore
/// for result in iter {
/// if let Ok(bench) = try!(result).parse() {
/// vec.push(bench)
/// for i in iter {
/// if let Ok(value) = i.parse() {
/// vec.push(value)
/// }
/// }
/// ```
Expand Down