Skip to content

Commit

Permalink
style: fixing some clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wllfaria committed May 4, 2024
1 parent 2e01da4 commit 67c0f70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 0 additions & 1 deletion reqtui/src/text_object/text_object.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use ratatui::{
style::Styled,
text::{Line, Span},
widgets::Paragraph,
};
use ropey::Rope;

Expand Down
19 changes: 11 additions & 8 deletions tui/src/components/api_explorer/api_explorer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::components::{
api_explorer::{
req_uri::ReqUri,
req_uri::ReqUriState,
req_uri::{ReqUri, ReqUriState},
res_viewer::{ResViewer, ResViewerState, ResViewerTabs},
sidebar::{Sidebar, SidebarState},
},
Expand Down Expand Up @@ -152,12 +151,16 @@ impl<'a> ApiExplorer<'a> {
Ok(None)
}

fn handle_req_uri_key_event(&self, _key_event: KeyEvent) -> anyhow::Result<Option<Command>> {
reqtui::net::handle_request(
self.selected_request.as_ref().unwrap().clone(),
self.request_tx.clone(),
self.colors.tokens.clone(),
);
fn handle_req_uri_key_event(&mut self, key_event: KeyEvent) -> anyhow::Result<Option<Command>> {
match key_event.code {
KeyCode::Char('i') => self.selected_pane = Some(PaneFocus::Preview),
KeyCode::Enter => reqtui::net::handle_request(
self.selected_request.as_ref().unwrap().clone(),
self.request_tx.clone(),
self.colors.tokens.clone(),
),
_ => {}
}
Ok(None)
}

Expand Down

0 comments on commit 67c0f70

Please sign in to comment.