Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement filtering requests by method #19

Merged
merged 2 commits into from Feb 21, 2023

Conversation

MMukundi
Copy link
Contributor

@MMukundi MMukundi commented Feb 21, 2023

Hello! My name is Marcel and I'm a recent Bachelor's graduate and Rust enthusiast 馃. I saw your posting on TWIR Call for Participation, and it seemed like a perfect avenue for my first open source contribution, closes #6.

feature.method_filter.demo.mov

I did my best to maintain the existing inline style of the code, and no keep the filter minimally intrusive visually. Please let me know if there's anything you'd like me to change :)

@@ -91,6 +92,7 @@ impl HttpHandler for Output {

#[derive(Clone, Debug)]
pub struct OutputRequest {
http_method: Method,
method: String,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I wasn't sure why the items were converted into Strings. My guess is to stop heap allocations each frame or a similar performance concern, but if not, then maybe the http_method field is an adequate replacement for the existing methodfield.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A rude truth: string conversions sucks and it is bad practice in this case but it was my first approach to gui and as the first versions was comfortable. One fo the next steps is to avoid the String conversion on everything. For now thank you very much for your effort, i review the code today.

Copy link
Owner

@emanuele-em emanuele-em left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you very much for your work, I'm creating a new issue regarding the string convertion (that sucks), I can assign this issue to you if you want

@emanuele-em emanuele-em merged commit 75c7c04 into emanuele-em:master Feb 21, 2023
@MMukundi
Copy link
Contributor Author

thank you very much for your work, I'm creating a new issue regarding the string convertion (that sucks), I can assign this issue to you if you want

That would be great!

@emanuele-em
Copy link
Owner

emanuele-em commented Feb 21, 2023

Awesome, the issue is #20 I hope I have made myself clear in the description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter request by method
2 participants