chore: Appease clippy
This commit is contained in:
parent
d1d6b56615
commit
f6153ff7c1
|
@ -1,5 +1,6 @@
|
|||
use crate::avm1::activation::Activation;
|
||||
use crate::avm1::{AvmString, Object, ObjectPtr, TObject, Value};
|
||||
use std::fmt::Write;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct VariableDumper<'a> {
|
||||
|
@ -174,7 +175,9 @@ impl<'a> VariableDumper<'a> {
|
|||
self.depth += 1;
|
||||
|
||||
for key in keys.into_iter() {
|
||||
self.output.push_str(&format!("{}.{}", name, key));
|
||||
self.output.push_str(name);
|
||||
self.output.push('.');
|
||||
let _ = write!(self.output, "{}", key);
|
||||
self.output.push_str(" = ");
|
||||
self.print_property(object, key, activation);
|
||||
self.output.push('\n');
|
||||
|
|
|
@ -114,7 +114,7 @@ impl Declaration {
|
|||
///
|
||||
/// # Usage:
|
||||
///
|
||||
/// ```rust,ignored
|
||||
/// ```rust,ignore
|
||||
/// const DECLS: &'static [Declaration] = declare_properties! {
|
||||
/// "length" => property(get_length);
|
||||
/// "filters" => property(get_filters, set_filters);
|
||||
|
@ -126,7 +126,7 @@ impl Declaration {
|
|||
/// "scale" => float(0.85);
|
||||
/// // all declarations can also specify attributes
|
||||
/// "hidden" => string("shh!"; DONT_ENUM | DONT_DELETE | READ_ONLY);
|
||||
/// }
|
||||
/// };
|
||||
/// ```
|
||||
macro_rules! declare_properties {
|
||||
( $($name:literal => $kind:ident($($args:tt)*);)* ) => {
|
||||
|
|
|
@ -127,7 +127,7 @@ impl BitmapDataStorage {
|
|||
.dyn_into()
|
||||
.unwrap();
|
||||
|
||||
let _ = context.put_image_data(&data, 0.0, 0.0).unwrap();
|
||||
context.put_image_data(&data, 0.0, 0.0).unwrap();
|
||||
|
||||
BitmapDataStorage::CanvasElement(canvas, context)
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ impl<'a> From<&'a str> for &'a SwfStr {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T: ?Sized + AsRef<str>> PartialEq<T> for SwfStr {
|
||||
impl<T: ?Sized + AsRef<str>> PartialEq<T> for SwfStr {
|
||||
fn eq(&self, other: &T) -> bool {
|
||||
&self.string == other.as_ref().as_bytes()
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ struct SoundInstance {
|
|||
impl Drop for SoundInstance {
|
||||
fn drop(&mut self) {
|
||||
if let SoundInstanceType::AudioBuffer(instance) = &self.instance_type {
|
||||
let _ = instance.buffer_source_node.set_onended(None);
|
||||
instance.buffer_source_node.set_onended(None);
|
||||
let _ = instance.node.disconnect();
|
||||
}
|
||||
}
|
||||
|
@ -474,7 +474,7 @@ impl WebAudioBackend {
|
|||
let closure = Closure::once_into_js(Box::new(ended_handler) as Box<dyn FnMut()>);
|
||||
// Note that we add the ended event to the AudioBufferSourceNode; an audio envelope adds more nodes
|
||||
// in the graph, but these nodes don't fire the ended event.
|
||||
let _ = buffer_source_node.set_onended(Some(closure.as_ref().unchecked_ref()));
|
||||
buffer_source_node.set_onended(Some(closure.as_ref().unchecked_ref()));
|
||||
|
||||
instance_handle
|
||||
}
|
||||
|
|
|
@ -263,7 +263,7 @@ impl<'a, T: Copy, U: Copy + Eq + TryFrom<T>> Predicate<T> for AnyOf<'a, U> {
|
|||
|
||||
pub struct FnPred<F>(F);
|
||||
|
||||
impl<'a, T: Into<u16>, F: Fn(u16) -> bool> Predicate<T> for FnPred<F> {
|
||||
impl<T: Into<u16>, F: Fn(u16) -> bool> Predicate<T> for FnPred<F> {
|
||||
fn is_match(&self, c: T) -> bool {
|
||||
(self.0)(c.into())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue