mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:07:38 +00:00
format
This commit is contained in:
@@ -90,14 +90,20 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn ascii_basic_indices() {
|
||||
let (idx, _score) = fuzzy_match("hello", "hl").expect("match");
|
||||
let (idx, _score) = match fuzzy_match("hello", "hl") {
|
||||
Some(v) => v,
|
||||
None => panic!("expected a match"),
|
||||
};
|
||||
assert_eq!(idx, vec![0, 2]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unicode_dotted_i_istanbul_highlighting() {
|
||||
// 'İ' lowercases to two chars (i + combining dot). Ensure index 0 is highlighted once.
|
||||
let (idx, _score) = fuzzy_match("İstanbul", "is").expect("match");
|
||||
let (idx, _score) = match fuzzy_match("İstanbul", "is") {
|
||||
Some(v) => v,
|
||||
None => panic!("expected a match"),
|
||||
};
|
||||
assert_eq!(idx, vec![0, 1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ impl ChatComposer<'_> {
|
||||
|
||||
/// Handle key events when file search popup is visible.
|
||||
fn handle_key_event_with_file_popup(&mut self, key_event: KeyEvent) -> (InputResult, bool) {
|
||||
let first_line_owned = self.first_line().to_string();
|
||||
let _first_line_owned = self.first_line().to_string();
|
||||
let ActivePopup::File(popup) = &mut self.active_popup else {
|
||||
unreachable!();
|
||||
};
|
||||
@@ -1222,7 +1222,9 @@ mod tests {
|
||||
let mut terminal = match Terminal::new(TestBackend::new(100, 10)) {
|
||||
Ok(t) => t,
|
||||
Err(e) => {
|
||||
eprintln!("Skipping ui_snapshots: failed to create terminal: {e}");
|
||||
// Avoid printing directly to stderr/stdout (clippy::print_stderr).
|
||||
// Log a warning instead and skip the snapshot test.
|
||||
tracing::warn!("Skipping ui_snapshots: failed to create terminal: {e}");
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user