pub fn merge(&mut self, other: &InputMap<A>) -> &mut Self {
        let associated_gamepad = if self.associated_gamepad == other.associated_gamepad {
            self.associated_gamepad
        } else {
            None
        };

        let mut new_map = InputMap {
            associated_gamepad,
            ..Default::default()
        };

        for action in A::iter() {
            for input in self.get(&action, None) {
                new_map.insert(action.clone(), input);
            }

            for input in other.get(&action, None) {
                new_map.insert(action.clone(), input);
            }
        }

        new_map.cache_possible_clashes();

        *self = new_map;
        self
    }
/// Merges the provided [`InputMap`] into the [`InputMap`] this method was called on
///
/// This adds both of their bindings to the resulting [`InputMap`].
/// Like usual, any duplicate bindings are ignored.
///
/// If the associated gamepads do not match, the resulting associated gamepad will be set to `None`.


If the associated gamepads do not match, the resulting associated gamepad will be set to `None`.
If the associated gamepads do not match the resulting associated gamepad will be set to ` None ` .
pub fn merge(&mut self, other: &InputMap<A>) -> &mut Self {
        let associated_gamepad = if self.associated_gamepad == other.associated_gamepad {
            self.associated_gamepad
        } else {
            None
        };
        let mut new_map = InputMap {
            associated_gamepad,
            ..Default::default()
        };
        for action in A::iter() {
            for input in self.get(&action, None) {
                new_map.insert(action.clone(), input);
            }
            for input in other.get(&action, None) {
                new_map.insert(action.clone(), input);
            }
        }
        new_map.cache_possible_clashes();
        *self = new_map;
        self
    }
pub fn merge ( & mut self , other : & InputMap < A > ) -> & mut Self { let associated_gamepad = if self . associated_gamepad == other . associated_gamepad { self . associated_gamepad } else { None } ; let mut new_map = InputMap { associated_gamepad , .. Default :: default ( ) } ; for action in A :: iter ( ) { for input in self . get ( & action , None ) { new_map . insert ( action . clone ( ) , input ) ; } for input in other . get ( & action , None ) { new_map . insert ( action . clone ( ) , input ) ; } } new_map . cache_possible_clashes ( ) ; * self = new_map ; self }
Merges the provided [`InputMap`] into the [`InputMap`] this method was called on
This adds both of their bindings to the resulting [`InputMap`].
Merges the provided [ ` InputMap ` ] into the [ ` InputMap ` ] this method was called on This adds both of their bindings to the resulting [ ` InputMap ` ] .
&mut self
other
&InputMap<A>
&mut self
other
&InputMap<A>