chore: Appease clippy
This commit is contained in:
parent
5da7149aaf
commit
1db29217eb
|
@ -131,12 +131,8 @@ fn get_progress<'gc>(
|
|||
// TODO: What happens with negative levels?
|
||||
activation.context.stage.child_by_depth(*level_id as i32)
|
||||
}
|
||||
Value::Object(object) => {
|
||||
if let Some(object) = object.as_display_object() {
|
||||
Some(object)
|
||||
} else {
|
||||
return Ok(Value::Undefined);
|
||||
}
|
||||
Value::Object(object) if object.as_display_object().is_some() => {
|
||||
object.as_display_object()
|
||||
}
|
||||
_ => return Ok(Value::Undefined),
|
||||
};
|
||||
|
|
|
@ -208,7 +208,7 @@ impl WString {
|
|||
fn with_wide_buf_if<W, F, R>(&mut self, wide: W, f: F) -> R
|
||||
where
|
||||
W: FnOnce() -> bool,
|
||||
F: FnOnce(Units<&mut Vec<u8>, &mut Vec<u16>>) -> R,
|
||||
F: FnOnce(&mut Units<Vec<u8>, Vec<u16>>) -> R,
|
||||
{
|
||||
self.with_buf(|units| {
|
||||
if let Units::Bytes(buf) = units {
|
||||
|
@ -219,11 +219,7 @@ impl WString {
|
|||
}
|
||||
}
|
||||
|
||||
let units_ref = match units {
|
||||
Units::Bytes(buf) => Units::Bytes(buf),
|
||||
Units::Wide(buf) => Units::Wide(buf),
|
||||
};
|
||||
f(units_ref)
|
||||
f(units)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue