style: replace match{state=} with state=if{}
This commit is contained in:
parent
3643ba0dfd
commit
959581d0b3
1 changed files with 5 additions and 8 deletions
|
@ -241,14 +241,11 @@ pub fn compile_markdown(
|
|||
_ => {}
|
||||
}
|
||||
|
||||
match state {
|
||||
State::Metadata(false) => {
|
||||
state = State::Start;
|
||||
}
|
||||
_ => {
|
||||
state = State::Paragraph;
|
||||
}
|
||||
}
|
||||
state = if state == State::Metadata(false) {
|
||||
State::Start
|
||||
} else {
|
||||
State::Paragraph
|
||||
};
|
||||
}
|
||||
|
||||
Text(text) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue