chore: Appease clippy
This commit is contained in:
parent
7d5463f850
commit
da4b5986b1
|
@ -679,12 +679,12 @@ pub fn get_text_format<'gc>(
|
|||
let mut begin_index = args
|
||||
.get(0)
|
||||
.cloned()
|
||||
.unwrap_or_else(|| Value::Integer(-1))
|
||||
.unwrap_or(Value::Integer(-1))
|
||||
.coerce_to_i32(activation)?;
|
||||
let mut end_index = args
|
||||
.get(1)
|
||||
.cloned()
|
||||
.unwrap_or_else(|| Value::Integer(-1))
|
||||
.unwrap_or(Value::Integer(-1))
|
||||
.coerce_to_i32(activation)?;
|
||||
|
||||
if begin_index < 0 {
|
||||
|
|
|
@ -146,7 +146,7 @@ fn to_exponential<'gc>(
|
|||
return Ok(AvmString::new_utf8(
|
||||
activation.context.gc_context,
|
||||
format!("{0:.1$e}", number, digits)
|
||||
.replace("e", "e+")
|
||||
.replace('e', "e+")
|
||||
.replace("e+-", "e-")
|
||||
.replace("e+0", ""),
|
||||
)
|
||||
|
|
|
@ -160,7 +160,7 @@ fn to_exponential<'gc>(
|
|||
return Ok(AvmString::new_utf8(
|
||||
activation.context.gc_context,
|
||||
format!("{0:.1$e}", number, digits)
|
||||
.replace("e", "e+")
|
||||
.replace('e', "e+")
|
||||
.replace("e+-", "e-")
|
||||
.replace("e+0", ""),
|
||||
)
|
||||
|
|
|
@ -146,7 +146,7 @@ fn to_exponential<'gc>(
|
|||
return Ok(AvmString::new_utf8(
|
||||
activation.context.gc_context,
|
||||
format!("{0:.1$e}", number, digits)
|
||||
.replace("e", "e+")
|
||||
.replace('e', "e+")
|
||||
.replace("e+-", "e-")
|
||||
.replace("e+0", ""),
|
||||
)
|
||||
|
|
|
@ -281,8 +281,7 @@ impl PendingPath {
|
|||
fn into_draw_commands(self) -> impl Iterator<Item = DrawCommand> {
|
||||
self.segments
|
||||
.into_iter()
|
||||
.map(PathSegment::into_draw_commands)
|
||||
.flatten()
|
||||
.flat_map(PathSegment::into_draw_commands)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -264,8 +264,7 @@ impl fmt::Debug for SwfStr {
|
|||
for chr in self
|
||||
.string
|
||||
.iter()
|
||||
.map(|&c| std::ascii::escape_default(c))
|
||||
.flatten()
|
||||
.flat_map(|&c| std::ascii::escape_default(c))
|
||||
{
|
||||
fmt::Write::write_char(f, char::from(chr))?;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue