Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
loop {
for message in client.incoming_messages() {
match message.unwrap() {
OwnedMessage::Text(data) => data,
_ => None,
};
}
}
@gregsifr

This comment has been minimized.

Copy link

gregsifr commented Nov 11, 2017

error[E0308]: match arms have incompatible types
  --> src/main.rs:67:17
   |
67 | /                 match message.unwrap() {
68 | |                     OwnedMessage::Text(data) => data,
69 | |                     _ => None,
70 | |                 };
   | |_________________^ expected struct `std::string::String`, found enum `std::option::Option`
   |
   = note: expected type `std::string::String`
              found type `std::option::Option<_>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.