chore: Fix nightly Clippy lints
This commit is contained in:
parent
40c0f90105
commit
5b685d411f
|
@ -1284,9 +1284,7 @@ impl<'gc> EditText<'gc> {
|
|||
|
||||
pub fn screen_position_to_index(self, position: Point<Twips>) -> Option<usize> {
|
||||
let text = self.0.read();
|
||||
let Some(mut position) = self.global_to_local(position) else {
|
||||
return None;
|
||||
};
|
||||
let mut position = self.global_to_local(position)?;
|
||||
position.x += Twips::from_pixels(Self::INTERNAL_PADDING) + Twips::from_pixels(text.hscroll);
|
||||
position.y += Twips::from_pixels(Self::INTERNAL_PADDING) + text.vertical_scroll_offset();
|
||||
|
||||
|
|
|
@ -3153,9 +3153,7 @@ impl<'gc> TInteractiveObject<'gc> for MovieClip<'gc> {
|
|||
|
||||
if self.visible() {
|
||||
let this: InteractiveObject<'gc> = (*self).into();
|
||||
let Some(local_matrix) = self.global_to_local_matrix() else {
|
||||
return None;
|
||||
};
|
||||
let local_matrix = self.global_to_local_matrix()?;
|
||||
|
||||
if let Some(masker) = self.masker() {
|
||||
// FIXME - should this really use `SKIP_INVISIBLE`? Avm2 doesn't.
|
||||
|
|
|
@ -100,6 +100,7 @@ fn main() -> Result<(), Error> {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[allow(clippy::unused_io_amount)]
|
||||
SocketEvent::WaitForDisconnect => {
|
||||
let mut buffer = [0; 4096];
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ thread_local! {
|
|||
/// issues with lifetimes and type parameters (which cannot be exported with wasm-bindgen).
|
||||
static INSTANCES: RefCell<Arena<RefCell<RuffleInstance>>> = RefCell::new(Arena::new());
|
||||
|
||||
static CURRENT_CONTEXT: RefCell<Option<*mut UpdateContext<'static, 'static>>> = RefCell::new(None);
|
||||
static CURRENT_CONTEXT: RefCell<Option<*mut UpdateContext<'static, 'static>>> = const { RefCell::new(None) };
|
||||
}
|
||||
|
||||
type AnimationHandler = Closure<dyn FnMut(f64)>;
|
||||
|
|
Loading…
Reference in New Issue