-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use question mark operator when possible (#11865)
# Objective - There are multiple instances of `let Some(x) = ... else { None };` throughout the project. - Because `Option<T>` implements [`Try`](https://doc.rust-lang.org/stable/std/ops/trait.Try.html), it can use the question mark `?` operator. ## Solution - Use question mark operator instead of `let Some(x) = ... else { None }`. --- There was another PR that did a similar thing a few weeks ago, but I couldn't find it.
- Loading branch information
Showing
3 changed files
with
8 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters