Fix typo
This commit is contained in:
parent
c5b3a719ed
commit
aa5f1f9078
@ -137,14 +137,14 @@ fn result_unwrap_or() {
|
||||
}
|
||||
|
||||
// don't lint in const fn
|
||||
const fn const_fn_unwrap_or() {
|
||||
const fn const_fn_option_unwrap_or() {
|
||||
match Some(1) {
|
||||
Some(s) => s,
|
||||
None => 0,
|
||||
};
|
||||
}
|
||||
|
||||
const fn const_fn_unwrap() {
|
||||
const fn const_fn_result_unwrap_or() {
|
||||
match Ok::<&str, &str>("Alice") {
|
||||
Ok(s) => s,
|
||||
Err(_) => "Bob",
|
||||
|
@ -176,14 +176,14 @@ fn method(self) -> Option<i32> {
|
||||
}
|
||||
|
||||
// don't lint in const fn
|
||||
const fn const_fn_unwrap_or() {
|
||||
const fn const_fn_option_unwrap_or() {
|
||||
match Some(1) {
|
||||
Some(s) => s,
|
||||
None => 0,
|
||||
};
|
||||
}
|
||||
|
||||
const fn const_fn_unwrap() {
|
||||
const fn const_fn_result_unwrap_or() {
|
||||
match Ok::<&str, &str>("Alice") {
|
||||
Ok(s) => s,
|
||||
Err(_) => "Bob",
|
||||
|
Loading…
Reference in New Issue
Block a user