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