Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
stun: simplify UnknownAttributes Display
Signed-off-by: Xiaobo Liu <[email protected]>
  • Loading branch information
cppcoffee committed Jun 2, 2025
commit 3663b37d9a268ee9064cffc583929b64ad3707fc
12 changes: 7 additions & 5 deletions stun/src/uattrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ impl fmt::Display for UnknownAttributes {
if self.0.is_empty() {
write!(f, "<nil>")
} else {
let mut s = vec![];
for t in &self.0 {
s.push(t.to_string());
}
write!(f, "{}", s.join(", "))
let s = self
.0
.iter()
.map(|t| t.to_string())
.collect::<Vec<_>>()
.join(", ");
write!(f, "{}", s)
}
}
}
Expand Down
Loading