Merge pull request #1045 from 0xmingx/main

fix bug
pull/1004/merge
Sunface 2 years ago committed by GitHub
commit ffe20cceb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -184,7 +184,7 @@ got = b"6"
let messages = subscriber
.into_stream()
.filter_map(|msg| match msg {
Ok(msg) if msg.content.len() == 1 => msg.unwrap().content,
Ok(msg) if msg.content.len() == 1 => Some(msg.content),
_ => None,
})
.take(3);

@ -145,7 +145,7 @@ fn main() {
`&(3, 5)` 会匹配模式 `&(x, y)`,因此 `x` 得到了 `3``y` 得到了 `5`
#### if 和 if let
#### let 和 if let
对于以下代码,编译器会报错:

Loading…
Cancel
Save