Fixing builds and workflows

This commit is contained in:
2026-01-31 17:52:44 +01:00
parent 971f40813f
commit 92d80d1dfe
5 changed files with 24 additions and 13 deletions

View File

@@ -45,7 +45,6 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
components: clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
@@ -82,12 +81,6 @@ jobs:
- name: Bundle desktop app
run: cargo bundle --release --features desktop --bin cagire-desktop --target ${{ matrix.target }}
- name: Run tests
run: cargo test --target ${{ matrix.target }}
- name: Run clippy
run: cargo clippy --target ${{ matrix.target }} -- -D warnings
- name: Upload artifact (Unix)
if: runner.os != 'Windows'
uses: actions/upload-artifact@v4

View File

@@ -48,6 +48,12 @@ pub struct App {
pub panel: PanelState,
}
impl Default for App {
fn default() -> Self {
Self::new()
}
}
impl App {
pub fn new() -> Self {
let variables = Arc::new(Mutex::new(HashMap::new()));

View File

@@ -16,6 +16,12 @@ pub struct ScopeBuffer {
peak_right: AtomicU32,
}
impl Default for ScopeBuffer {
fn default() -> Self {
Self::new()
}
}
impl ScopeBuffer {
pub fn new() -> Self {
Self {
@@ -64,6 +70,12 @@ pub struct SpectrumBuffer {
pub bands: [AtomicU32; 32],
}
impl Default for SpectrumBuffer {
fn default() -> Self {
Self::new()
}
}
impl SpectrumBuffer {
pub fn new() -> Self {
Self {

View File

@@ -2,9 +2,9 @@ mod audio;
mod link;
pub mod sequencer;
pub use audio::{build_stream, AnalysisHandle, AudioStreamConfig, ScopeBuffer, SpectrumBuffer};
pub use audio::{build_stream, AudioStreamConfig, ScopeBuffer, SpectrumBuffer};
pub use link::LinkState;
pub use sequencer::{
spawn_sequencer, AudioCommand, PatternChange, PatternSnapshot, SeqCommand, SequencerConfig,
SequencerHandle, SequencerSnapshot, StepSnapshot,
SequencerSnapshot, StepSnapshot,
};

View File

@@ -265,7 +265,7 @@ fn wrapped_line_count(line: &RLine, width: usize) -> usize {
if char_count == 0 || width == 0 {
1
} else {
(char_count + width - 1) / width
char_count.div_ceil(width)
}
}
@@ -392,9 +392,9 @@ fn preprocess_markdown(md: &str) -> String {
fn convert_dash_lists(line: &str) -> String {
let trimmed = line.trim_start();
if trimmed.starts_with("- ") {
if let Some(rest) = trimmed.strip_prefix("- ") {
let indent = line.len() - trimmed.len();
format!("{}* {}", " ".repeat(indent), &trimmed[2..])
format!("{}* {}", " ".repeat(indent), rest)
} else {
line.to_string()
}
@@ -487,7 +487,7 @@ fn render_table_row(row: TableRow, row_idx: usize, col_widths: &[usize]) -> RLin
let is_header = row_idx == 0;
let bg = if is_header {
theme.ui.surface
} else if row_idx % 2 == 0 {
} else if row_idx.is_multiple_of(2) {
theme.table.row_even
} else {
theme.table.row_odd