Skip to content

Commit

Permalink
clippy fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
damian-tworek committed Dec 21, 2023
1 parent 6e23716 commit e593263
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 10 additions & 2 deletions client/src/app/rtp_streams_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,17 @@ impl RtpStreamsTable {
ui.label(stream.cname.as_ref().unwrap_or(&"N/A".to_string()));
});
row.col(|ui| {
let pt = stream.payload_types.iter().map(|pt| pt.id.to_string()).collect::<Vec<String>>()
let pt = stream
.payload_types
.iter()
.map(|pt| pt.id.to_string())
.collect::<Vec<String>>()
.join(", ");
let on_hover = stream.payload_types.iter().map(|pt| pt.to_string()).collect::<Vec<String>>()
let on_hover = stream
.payload_types
.iter()
.map(|pt| pt.to_string())
.collect::<Vec<String>>()
.join("\n");

ui.label(pt).on_hover_text(on_hover);
Expand Down
6 changes: 4 additions & 2 deletions client/src/streams/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,12 @@ impl Stream {
let id = &rtp_info.packet.payload_type.id;
if let Some(last_payload_type) = self.payload_types.last() {
if last_payload_type.id != *id {
self.payload_types.push(rtp_info.packet.payload_type.clone())
self.payload_types
.push(rtp_info.packet.payload_type.clone())
}
} else {
self.payload_types.push(rtp_info.packet.payload_type.clone())
self.payload_types
.push(rtp_info.packet.payload_type.clone())
}

if let Some(sdp) = &self.sdp {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ enum RtpeekerSubcommands {
/// Run the app. E.g "run -f rtp.pcap webex.pcap -i etn0 wireless". Obtain help with "run --help"
Run(cmd::run::Run),

/// List network interfaces.
/// List network interfaces
List(cmd::list::List),
}

0 comments on commit e593263

Please sign in to comment.