net: fix typo in new_ip() (#13017)

pull/13018/head
yuyi 2022-01-03 14:45:26 +08:00 committed by GitHub
parent 1ad4fbd841
commit d5b111ec99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ fn new_ip6(port u16, addr [16]byte) Addr {
} }
} }
copy(a.addr.Ip6.addr[0..], addr[0..]) copy(a.addr.Ip6.addr[..], addr[..])
return a return a
} }
@ -39,7 +39,7 @@ fn new_ip(port u16, addr [4]byte) Addr {
} }
} }
copy(a.addr.Ip6.addr[0..], addr[0..]) copy(a.addr.Ip.addr[..], addr[..])
return a return a
} }