INNER CODE UNIT · Rust

primary_key_for_action

bgreenwell/doxx · src/keymap/mod.rs:44

    pub fn primary_key_for_action(&self, action: Action) -> String {
        self.keys_for_action(action)
            .into_iter()
            .next()
            .unwrap_or_else(|| "(unbound)".to_string())
    }
}

impl Default for Keymap {
    fn default() -> Self {
        Self::from_preset(KeymapPreset::Default)
    }
}

#[cfg(test)]
mod tests {
    use super::*;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…