mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
ptp-helper: Fix clippy warning and simplify code a bit
warning: you seem to be trying to use `match` for an equality check. Consider using `if` --> ../subprojects/gstreamer/libs/gst/helpers/ptp/main.rs:246:17 | 246 | / match ptp_message.message_type { 247 | | PtpMessageType::DELAY_REQ => { 248 | | if args.verbose { 249 | | trace!("Ignoring our own PTP message"); ... | 253 | | _ => (), 254 | | } | |_________________^ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6245>
This commit is contained in:
parent
a5a1944db4
commit
9ab9ceb964
1 changed files with 4 additions and 7 deletions
|
@ -243,14 +243,11 @@ fn run() -> Result<(), Error> {
|
|||
// The delay request is the only message that is sent
|
||||
// from PTP clock implementation, if others are added
|
||||
// additional match arms should be added.
|
||||
match ptp_message.message_type {
|
||||
PtpMessageType::DELAY_REQ => {
|
||||
if args.verbose {
|
||||
trace!("Ignoring our own PTP message");
|
||||
}
|
||||
continue 'next_packet;
|
||||
if [PtpMessageType::DELAY_REQ].contains(&ptp_message.message_type) {
|
||||
if args.verbose {
|
||||
trace!("Ignoring our own PTP message");
|
||||
}
|
||||
_ => (),
|
||||
continue 'next_packet;
|
||||
}
|
||||
|
||||
if let PtpMessagePayload::DelayResp {
|
||||
|
|
Loading…
Reference in a new issue