fix test error

This commit is contained in:
Takayuki Maeda 2021-09-27 00:50:46 +09:00
parent 620f480e64
commit 3e41397ef2

View File

@ -2,14 +2,16 @@ error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
--> $DIR/issue-62843.rs:4:32 --> $DIR/issue-62843.rs:4:32
| |
LL | println!("{:?}", line.find(pattern)); LL | println!("{:?}", line.find(pattern));
| ---- ^^^^^^^ | ---- ^^^^^^^ expected an implementor of trait `Pattern<'_>`
| | | | |
| | expected an implementor of trait `Pattern<'_>`
| | help: consider borrowing here: `&pattern`
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: the trait bound `String: Pattern<'_>` is not satisfied = note: the trait bound `String: Pattern<'_>` is not satisfied
= note: required because of the requirements on the impl of `Pattern<'_>` for `String` = note: required because of the requirements on the impl of `Pattern<'_>` for `String`
help: consider borrowing here
|
LL | println!("{:?}", line.find(&pattern));
| +
error: aborting due to previous error error: aborting due to previous error