fix: remove TUI boolean bug, P2P unwrap violation, and WebTransport placeholder
- Remove `|| true` from cursor positioning condition in v2_tui.rs - Replace .lock().unwrap() with .expect() in P2P routing tests - Remove assert!(true) placeholder in WebTransport test
This commit is contained in:
@@ -829,7 +829,7 @@ fn draw_input(frame: &mut Frame, app: &TuiApp, area: Rect) {
|
||||
frame.render_widget(input_text, area);
|
||||
|
||||
// Position cursor in the input area.
|
||||
if !app.input.is_empty() || true {
|
||||
if !app.input.is_empty() {
|
||||
let cursor_x = area.x + 1 + app.input_cursor as u16;
|
||||
let cursor_y = area.y + 1;
|
||||
if cursor_x < area.x + area.width - 1 {
|
||||
|
||||
@@ -413,10 +413,10 @@ mod tests {
|
||||
};
|
||||
|
||||
router.add_peer(pk, route);
|
||||
assert!(router.peers.lock().unwrap().contains_key(&pk));
|
||||
assert!(router.peers.lock().expect("routing table lock poisoned").contains_key(&pk));
|
||||
|
||||
router.remove_peer(&pk);
|
||||
assert!(!router.peers.lock().unwrap().contains_key(&pk));
|
||||
assert!(!router.peers.lock().expect("routing table lock poisoned").contains_key(&pk));
|
||||
|
||||
drop(router);
|
||||
Arc::try_unwrap(node).ok().expect("sole owner").close().await;
|
||||
|
||||
@@ -415,6 +415,6 @@ pub fn build_webtransport_server_config(
|
||||
mod tests {
|
||||
#[test]
|
||||
fn webtransport_module_compiles() {
|
||||
assert!(true);
|
||||
// Module-level compilation check; no runtime assertion needed.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user