This commit is contained in:
Jean-Marie Mineau 2025-01-10 14:56:52 +01:00
parent 483ac8637c
commit f9f511013d
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
9 changed files with 347 additions and 224 deletions

View file

@ -199,7 +199,7 @@ impl DebugInfoItem {
address = addr;
addr_diff = 0;
}
if line_diff < -4 || line_diff >= 15 - 4 {
if !(-4..15 - 4).contains(&line_diff) {
bytecode.push(DbgBytecode::AdvanceLine {
line_diff: Sleb128(line_diff),
});
@ -215,7 +215,7 @@ impl DebugInfoItem {
}
}
}
if bytecode.len() == 0 || bytecode[bytecode.len() - 1] != DbgBytecode::EndSequence {
if bytecode.is_empty() || bytecode[bytecode.len() - 1] != DbgBytecode::EndSequence {
bytecode.push(DbgBytecode::EndSequence);
}
Self {