feat: new ind-which-show DDS event to change the which component behavior (#3608)

This commit is contained in:
三咲雅 misaki masa 2026-01-25 03:06:50 +08:00 committed by GitHub
parent afc694c122
commit face6aed40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 216 additions and 321 deletions

View file

@ -30,14 +30,17 @@ impl Deref for ChordCow {
}
impl Default for ChordCow {
fn default() -> Self { Self::Owned(Chord::default()) }
fn default() -> Self {
const C: &Chord = &Chord { on: vec![], run: vec![], desc: None, r#for: None };
Self::Borrowed(C)
}
}
impl ChordCow {
pub fn into_seq(self) -> Vec<CmdCow> {
match self {
Self::Owned(c) => c.run.into_iter().rev().map(|c| c.into()).collect(),
Self::Borrowed(c) => c.run.iter().rev().map(|c| c.into()).collect(),
Self::Owned(c) => c.run.into_iter().rev().map(Into::into).collect(),
Self::Borrowed(c) => c.run.iter().rev().map(Into::into).collect(),
}
}
}