Skip to content

Commit

Permalink
Remove reflection from methods selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Reiter committed Sep 28, 2024
1 parent 2663e59 commit 483de7c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
10 changes: 1 addition & 9 deletions wireman/src/events/selection/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub enum MethodsSelectionEvents {
Unselect,
ClearSearch,
GoToServices,
Reflection,
}

impl fmt::Display for MethodsSelectionEvents {
Expand All @@ -28,7 +27,6 @@ impl fmt::Display for MethodsSelectionEvents {
MethodsSelectionEvents::Unselect => "Unselect",
MethodsSelectionEvents::ClearSearch => "Clear Search",
MethodsSelectionEvents::GoToServices => "Go to Services",
MethodsSelectionEvents::Reflection => "Switch to Reflection Mode",
};
write!(f, "{display_str}")
}
Expand Down Expand Up @@ -88,19 +86,13 @@ impl EventHandler for MethodsSelectionEventsHandler {
MethodsSelectionEvents::GoToServices => {
ctx.selection_tab = SelectionTab::Services;
}
MethodsSelectionEvents::Reflection => {
ctx.selection.borrow_mut().toggle_reflection_mode();
}
}
}

fn key_event_mappings(ctx: &Self::Context) -> Vec<(KeyEvent, MethodsSelectionEvents)> {
let method_selected = ctx.selection.borrow().selected_method().is_some();
let filter_active = ctx.selection.borrow_mut().methods_filter.is_some();
let mut map = vec![(
KeyEvent::ctrl(KeyCode::Char('r')),
MethodsSelectionEvents::Reflection,
)];
let mut map = vec![];
if method_selected {
map.extend([
(
Expand Down
10 changes: 0 additions & 10 deletions wireman/src/model/core_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ impl CoreClient {
Ok(())
}

// pub async fn reflect(host: &str) -> Option<ProtoDescriptor> {
// match ProtoDescriptor::reflect(host).await {
// Ok(desc) => Some(desc),
// Err(err) => {
// Logger::critical(format!("server reflection failed: {err}"));
// None
// }
// }
// }

/// Return the proto Services
pub fn get_services(&self) -> Vec<ServiceDescriptor> {
self.desc.get_services()
Expand Down

0 comments on commit 483de7c

Please sign in to comment.