mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vfmt: change all '$expr' to '${expr}' (#16428)
This commit is contained in:
@@ -77,7 +77,7 @@ fn (a Ip) str() string {
|
||||
saddr := unsafe { cstring_to_vstring(&buf[0]) }
|
||||
port := C.ntohs(a.port)
|
||||
|
||||
return '$saddr:$port'
|
||||
return '${saddr}:${port}'
|
||||
}
|
||||
|
||||
fn (a Ip6) str() string {
|
||||
@@ -92,7 +92,7 @@ fn (a Ip6) str() string {
|
||||
saddr := unsafe { cstring_to_vstring(&buf[0]) }
|
||||
port := C.ntohs(a.port)
|
||||
|
||||
return '[$saddr]:$port'
|
||||
return '[${saddr}]:${port}'
|
||||
}
|
||||
|
||||
const aoffset = __offsetof(Addr, addr)
|
||||
@@ -187,7 +187,7 @@ pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr {
|
||||
|
||||
results := &C.addrinfo(0)
|
||||
|
||||
sport := '$port'
|
||||
sport := '${port}'
|
||||
|
||||
// This might look silly but is recommended by MSDN
|
||||
$if windows {
|
||||
@@ -230,7 +230,7 @@ pub fn resolve_ipaddrs(addr string, family AddrFamily, typ SocketType) ![]Addr {
|
||||
addresses << new_addr
|
||||
}
|
||||
else {
|
||||
panic('Unexpected address family $result.ai_family')
|
||||
panic('Unexpected address family ${result.ai_family}')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user