style: replace match{state=} with state=if{}

This commit is contained in:
DarkCat09 2024-11-21 18:05:37 +04:00
parent 3643ba0dfd
commit 959581d0b3
Signed by: DarkCat09
GPG key ID: BD3CE9B65916CD82

View file

@ -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) => {