Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21a46533 authored by Harry Cutts's avatar Harry Cutts
Browse files

InputVerifier: put parameters into a struct

This makes it clearer which parameter is which when calling, and also
allows us to make the tests much more succinct by using struct update
syntax.

Bug: 245989146
Test: $ atest --host libinput_rust_test
Flag: EXEMPT refactor
Change-Id: If68332d652186b7283435cbc41af78bf12aa5b94
parent 26640c99
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ pub enum SourceClass {

bitflags! {
    /// Source of the input device or input events.
    #[derive(Debug, PartialEq)]
    #[derive(Clone, Copy, Debug, PartialEq)]
    pub struct Source: u32 {
        // Constants from SourceClass, added here for compatibility reasons
        /// SourceClass::Button
@@ -219,7 +219,7 @@ bitflags! {
    /// MotionEvent flags.
    /// The source of truth for the flag definitions are the MotionEventFlag AIDL enum.
    /// The flag values are redefined here as a bitflags API.
    #[derive(Debug)]
    #[derive(Clone, Copy, Debug)]
    pub struct MotionFlags: u32 {
        /// FLAG_WINDOW_IS_OBSCURED
        const WINDOW_IS_OBSCURED = MotionEventFlag::WINDOW_IS_OBSCURED.0 as u32;