-
-
Notifications
You must be signed in to change notification settings - Fork 298
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show interface names #340
Show interface names #340
Conversation
We use insta for most of our tests. I recommend installing the companion tool cargo-insta, then you can use P.S. and don't worry if there are spontaneous test failures in CI for Windows/MacOS. These are known issues and are being worked on. As long as CI passes for Ubuntu, you should be good to go. |
Looks alright now. There are a few small things I'l touch up and then we'll merge. |
src/display/ui.rs
Outdated
pub fn update_interface_name(&mut self, interface_name: Option<String>) { | ||
self.state.interface_name = interface_name; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of trivial setter method is very "Java-esque" and creates a lot of (frankly unnecessary) boilerplate code. We typically don't do this in Rust.
src/main.rs
Outdated
@@ -155,6 +155,7 @@ where | |||
let mut ui = ui.lock().unwrap(); | |||
let paused = paused.load(Ordering::SeqCst); | |||
let ui_offset = ui_offset.load(Ordering::SeqCst); | |||
ui.update_interface_name(opts.interface.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to run in the main loop.
Changelog detection in CI is not working due to an unhandled edge case, which was fixed in #342. Merging. |
fixing old commits
solves issue #37 to some extent
unfortunately i wasn't able to figure out how to add the network interface type along side it's name