MB
Size: a a a
MB
A
MB
MB
A
MB
A
MB
MB
A
a
А⚙
a
a
MK
let result = match char_option {
None => "char_option contains nothing",
Some(c) if c == 'a' => "char_option contains 'a'",
Some(c) if c == symbol => "char_option contains the same thing as variable symbol",
Some(_) => "Other",
};
let result = match char_option {
None => "char_option contains nothing",
Some(char_option) => match char_option {
'a' => "char_option contains 'a'",
c if c == symbol => "char_option contains the same thing as variable symbol",
_ => format!("other"),
},
};
a
a
G
let result = match char_option {
None => "char_option contains nothing",
Some(c) if c == 'a' => "char_option contains 'a'",
Some(c) if c == symbol => "char_option contains the same thing as variable symbol",
Some(_) => "Other",
};
let result = match char_option {
None => "char_option contains nothing",
Some(char_option) => match char_option {
'a' => "char_option contains 'a'",
c if c == symbol => "char_option contains the same thing as variable symbol",
_ => format!("other"),
},
};
match self.field.at(*y, *x) {
Some(&Some(ch)) if ch == symbol => true,
_ => false
}
a
MB
matches!(self.field.at(*y, *x), Some(&ch) if ch == symbol)
не сработает?