Skip to content

Bump dark-light to work

592ac5b
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat: add automatic dark/light theme switching based on system preference #397

Bump dark-light to work
592ac5b
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 7, 2026 in 1s

clippy

77 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 77
Note 0
Help 0

Versions

  • rustc 1.95.0-beta.7 (cc969f3c4 2026-04-03)
  • cargo 1.95.0-beta.7 (f2d3ce0bd 2026-03-21)
  • clippy 0.1.95 (cc969f3c45 2026-04-03)

Annotations

Check warning on line 173 in crates/tui/src/ui/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the variable `char_pos` is used as a loop counter

warning: the variable `char_pos` is used as a loop counter
   --> crates/tui/src/ui/mod.rs:173:5
    |
173 |     for (ci, ch) in path_str.char_indices() {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (char_pos, (ci, ch)) in path_str.char_indices().enumerate()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#explicit_counter_loop
    = note: `#[warn(clippy::explicit_counter_loop)]` on by default

Check warning on line 100 in crates/tui/src/ui/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
   --> crates/tui/src/ui/mod.rs:93:5
    |
 93 | /     if let Some(sb) = sidebar_area {
 94 | |         if app.mode == AppMode::NoSession
 95 | |             && app.focus == Focus::CallStack
 96 | |             && !app.file_browser_results.is_empty()
...   |
100 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
    |
 93 ~     if let Some(sb) = sidebar_area
 94 ~         && app.mode == AppMode::NoSession
 95 |             && app.focus == Focus::CallStack
...
 98 |             render_file_browser_overflow(app, frame, sb);
 99 ~         }
    |

Check warning on line 50 in crates/tui/src/ui/variables.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/variables.rs:37:21
   |
37 | /                     if ref_id > 0 {
38 | |                         if let Some(children) = app.variables_cache.get(&ref_id) {
39 | |                             for child in children {
40 | |                                 flat_items.push(make_variable_item(
...  |
50 | |                     }
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
37 ~                     if ref_id > 0
38 ~                         && let Some(children) = app.variables_cache.get(&ref_id) {
39 |                             for child in children {
...
48 |                             }
49 ~                         }
   |

Check warning on line 51 in crates/tui/src/ui/variables.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/variables.rs:36:17
   |
36 | /                 if let Some(ref_id) = var.variables_reference {
37 | |                     if ref_id > 0 {
38 | |                         if let Some(children) = app.variables_cache.get(&ref_id) {
39 | |                             for child in children {
...  |
51 | |                 }
   | |_________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
36 ~                 if let Some(ref_id) = var.variables_reference
37 ~                     && ref_id > 0 {
38 |                         if let Some(children) = app.variables_cache.get(&ref_id) {
...
49 |                         }
50 ~                     }
   |

Check warning on line 83 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:83:22
   |
83 |         binding_line(&kb_step_out, "Step Out", key_style, desc_style),
   |                      ^^^^^^^^^^^^ help: change this to: `kb_step_out`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 82 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:82:22
   |
82 |         binding_line(&kb_step_into, "Step In", key_style, desc_style),
   |                      ^^^^^^^^^^^^^ help: change this to: `kb_step_into`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 81 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:81:22
   |
81 |         binding_line(&kb_step_over, "Step Over", key_style, desc_style),
   |                      ^^^^^^^^^^^^^ help: change this to: `kb_step_over`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 80 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:80:22
   |
80 |         binding_line(&kb_restart, "Restart session", key_style, desc_style),
   |                      ^^^^^^^^^^^ help: change this to: `kb_restart`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 79 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:79:22
   |
79 |         binding_line(&kb_stop, "Terminate / Shutdown", key_style, desc_style),
   |                      ^^^^^^^^ help: change this to: `kb_stop`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow

Check warning on line 74 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> crates/tui/src/ui/help.rs:74:13
   |
74 |             &kb_continue,
   |             ^^^^^^^^^^^^ help: change this to: `kb_continue`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_borrow
   = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 20 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/help.rs:20:24
   |
20 |     let popup_height = ((area.height as f32 * 0.85) as u16).min(45).max(12);
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.height as f32 * 0.85) as u16).clamp(12, 45)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 19 in crates/tui/src/ui/help.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/help.rs:19:23
   |
19 |     let popup_width = ((area.width as f32 * 0.7) as u16).min(70).max(40);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.7) as u16).clamp(40, 70)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 18 in crates/tui/src/ui/file_picker.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/file_picker.rs:18:24
   |
18 |     let popup_height = ((area.height as f32 * 0.6) as u16).min(20).max(8);
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.height as f32 * 0.6) as u16).clamp(8, 20)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 17 in crates/tui/src/ui/file_picker.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/file_picker.rs:17:23
   |
17 |     let popup_width = ((area.width as f32 * 0.6) as u16).min(80).max(30);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.6) as u16).clamp(30, 80)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp

Check warning on line 16 in crates/tui/src/ui/evaluate_popup.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

clamp-like pattern without using clamp function

warning: clamp-like pattern without using clamp function
  --> crates/tui/src/ui/evaluate_popup.rs:16:23
   |
16 |     let popup_width = ((area.width as f32 * 0.5) as u16).min(60).max(30);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `((area.width as f32 * 0.5) as u16).clamp(30, 60)`
   |
   = note: clamp will panic if max < min
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#manual_clamp
   = note: `#[warn(clippy::manual_clamp)]` on by default

Check warning on line 94 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`)
  --> crates/tui/src/ui/code_view.rs:94:41
   |
94 | ...                   return Some((frame.line as usize).saturating_sub(1));
   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: try: `frame.line`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_cast

Check warning on line 96 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` statement can be collapsed

warning: this `if` statement can be collapsed
  --> crates/tui/src/ui/code_view.rs:92:21
   |
92 | /                     if let Some(source) = &frame.source {
93 | |                         if source.path.as_ref() == Some(path) {
94 | |                             return Some((frame.line as usize).saturating_sub(1));
95 | |                         }
96 | |                     }
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_if
help: collapse nested if block
   |
92 ~                     if let Some(source) = &frame.source
93 ~                         && source.path.as_ref() == Some(path) {
94 |                             return Some((frame.line as usize).saturating_sub(1));
95 ~                         }
   |

Check warning on line 19 in crates/tui/src/ui/code_view.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

initializer for `thread_local` value can be made `const`

warning: initializer for `thread_local` value can be made `const`
  --> crates/tui/src/ui/code_view.rs:19:88
   |
19 |     static LAST_FILE: std::cell::RefCell<Option<(std::path::PathBuf, &'static str)>> = std::cell::RefCell::new(None);
   |                                                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `const { std::cell::RefCell::new(None) }`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#missing_const_for_thread_local
   = note: `#[warn(clippy::missing_const_for_thread_local)]` on by default

Check warning on line 221 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` has identical blocks

warning: this `if` has identical blocks
   --> crates/tui/src/syntax.rs:219:58
    |
219 |                   let gutter_marker = if is_exec && has_bp {
    |  __________________________________________________________^
220 | |                     "\u{25b6}" // ▶ (exec takes precedence, but on a bp line)
221 | |                 } else if is_exec {
    | |_________________^
    |
note: same as this
   --> crates/tui/src/syntax.rs:221:35
    |
221 |                   } else if is_exec {
    |  ___________________________________^
222 | |                     "\u{25b6}" // ▶
223 | |                 } else if has_bp {
    | |_________________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#if_same_then_else
    = note: `#[warn(clippy::if_same_then_else)]` on by default

Check warning on line 204 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `map_or` can be simplified

warning: this `map_or` can be simplified
   --> crates/tui/src/syntax.rs:203:35
    |
203 |                   let is_selected = selection_range
    |  ___________________________________^
204 | |                     .map_or(false, |(start, end)| line_idx >= start && line_idx <= end);
    | |_______________________________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use `is_some_and` instead
    |
204 -                     .map_or(false, |(start, end)| line_idx >= start && line_idx <= end);
204 +                     .is_some_and(|(start, end)| line_idx >= start && line_idx <= end);
    |

Check warning on line 188 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (11/7)

warning: this function has too many arguments (11/7)
   --> crates/tui/src/syntax.rs:176:5
    |
176 | /     pub fn build_lines(
177 | |         highlighted: &[Vec<StyledSegment>],
178 | |         start_line: usize,
179 | |         gutter_width: usize,
...   |
187 | |         theme: &Theme,
188 | |     ) -> Vec<Line<'static>> {
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments

Check warning on line 119 in crates/tui/src/syntax.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the loop variable `line_idx` is used to index `lines`

warning: the loop variable `line_idx` is used to index `lines`
   --> crates/tui/src/syntax.rs:119:25
    |
119 |         for line_idx in start_line..end_line.min(lines.len()) {
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#needless_range_loop
    = note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
    |
119 -         for line_idx in start_line..end_line.min(lines.len()) {
119 +         for (line_idx, <item>) in lines.iter().enumerate().take(end_line.min(lines.len())).skip(start_line) {
    |

Check warning on line 710 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for an equality check. Consider using `if`

warning: you seem to be trying to use `match` for an equality check. Consider using `if`
   --> crates/tui/src/input.rs:703:5
    |
703 | /     match action {
704 | |         LineEditorAction::Submitted => {
705 | |             if is_paused {
706 | |                 app.evaluate_repl();
...   |
709 | |         _ => {}
710 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#single_match
help: try
    |
703 ~     if action == LineEditorAction::Submitted {
704 +         if is_paused {
705 +             app.evaluate_repl();
706 +         }
707 +     }
    |

Check warning on line 707 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` can be collapsed into the outer `match`

warning: this `if` can be collapsed into the outer `match`
   --> crates/tui/src/input.rs:705:13
    |
705 | /             if is_paused {
706 | |                 app.evaluate_repl();
707 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_match
help: collapse nested if block
    |
704 ~         LineEditorAction::Submitted
705 ~             if is_paused => {
706 |                 app.evaluate_repl();
707 ~             }
    |

Check warning on line 682 in crates/tui/src/input.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `if` can be collapsed into the outer `match`

warning: this `if` can be collapsed into the outer `match`
   --> crates/tui/src/input.rs:680:13
    |
680 | /             if !app.output_auto_scroll {
681 | |                 app.output_scroll_offset = app.output_scroll_offset.saturating_sub(1);
682 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#collapsible_match
help: collapse nested if block
    |
679 ~         KeyCode::Char('k') | KeyCode::Up
680 ~             if !app.output_auto_scroll => {
681 |                 app.output_scroll_offset = app.output_scroll_offset.saturating_sub(1);
682 ~             }
    |