Skip to content

Commit

Permalink
Include room for SocketAddrV6 to serialize scope id
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 5, 2020
1 parent be7d0e7 commit 2b50409
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serde/src/ser/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,10 @@ impl Serialize for net::SocketAddrV6 {
S: Serializer,
{
if serializer.is_human_readable() {
const MAX_LEN: usize = 47;
const MAX_LEN: usize = 58;
debug_assert_eq!(
MAX_LEN,
"[1001:1002:1003:1004:1005:1006:1007:1008]:65000".len()
"[1001:1002:1003:1004:1005:1006:1007:1008%4294967295]:65000".len()
);
serialize_display_bounded_length!(self, MAX_LEN, serializer)
} else {
Expand Down

0 comments on commit 2b50409

Please sign in to comment.