Fixing builds and workflows
This commit is contained in:
@@ -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()));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user