Workspace lints and disallow unwrap (#855)

Sets submodules to use workspace lints. Added denying unwrap as a
workspace level lint, which found a couple of cases where we could have
propagated errors. Also manually labeled ones that were fine by my eye.
This commit is contained in:
jcoens-openai
2025-05-08 09:46:18 -07:00
committed by GitHub
parent 9fdf2fa066
commit 87cf120873
22 changed files with 95 additions and 8 deletions

View File

@@ -107,7 +107,7 @@ impl App<'_> {
pub(crate) fn run(&mut self, terminal: &mut tui::Tui) -> Result<()> {
// Insert an event to trigger the first render.
let app_event_tx = self.app_event_tx.clone();
app_event_tx.send(AppEvent::Redraw).unwrap();
app_event_tx.send(AppEvent::Redraw)?;
while let Ok(event) = self.app_event_rx.recv() {
match event {
@@ -128,7 +128,7 @@ impl App<'_> {
modifiers: crossterm::event::KeyModifiers::CONTROL,
..
} => {
self.app_event_tx.send(AppEvent::ExitRequest).unwrap();
self.app_event_tx.send(AppEvent::ExitRequest)?;
}
_ => {
self.dispatch_key_event(key_event);

View File

@@ -2,7 +2,6 @@
// The standalone `codex-tui` binary prints a short help message before the
// alternatescreen mode starts; that file optsout locally via `allow`.
#![deny(clippy::print_stdout, clippy::print_stderr)]
use app::App;
use codex_core::config::Config;
use codex_core::config::ConfigOverrides;