Replace some _ == _ || _ == _
s with matches!(_, _ | _)
s
This commit is contained in:
parent
4d75f61832
commit
f1d273cbfb
7 changed files with 7 additions and 7 deletions
|
@ -142,7 +142,7 @@ impl StyledBuffer {
|
|||
pub fn set_style(&mut self, line: usize, col: usize, style: Style, overwrite: bool) {
|
||||
if let Some(ref mut line) = self.lines.get_mut(line) {
|
||||
if let Some(StyledChar { style: s, .. }) = line.get_mut(col) {
|
||||
if overwrite || *s == Style::NoStyle || *s == Style::Quotation {
|
||||
if overwrite || matches!(s, Style::NoStyle | Style::Quotation) {
|
||||
*s = style;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue