Skip to content

Commit

Permalink
Remove no longer existing IP address methods from ipcheck
Browse files Browse the repository at this point in the history
The is_unicast_site_local() method has been gone since Rust 1.55[1] and
is_ietf_protocol_assignment() since 1.56[2].

I had to run this tool to test something, saw it wouldn't build with
modern Rust.

[1] rust-lang/rust#85820
[2] rust-lang/rust#86439
  • Loading branch information
jstasiak committed Dec 7, 2023
1 parent 5d00f2e commit 47f89e0
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 28 deletions.
2 changes: 0 additions & 2 deletions tools/ipcheck/impls/dotnet/IPCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ static void Main(string[] args)
is_benchmarking = "<unsupported>",
is_documentation = "<unsupported>",
is_global = "<unsupported>",
is_ietf_protocol_assignment = "<unsupported>",
is_shared = "<unsupported>",
is_unicast_link_local = addr.IsIPv6LinkLocal,
is_unicast_site_local = addr.IsIPv6SiteLocal,
is_unique_local = "<unsupported>",
mc_scope_admin_local = "<unsupported>",
mc_scope_global = "<unsupported>",
Expand Down
6 changes: 0 additions & 6 deletions tools/ipcheck/impls/go/ipcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ func main() {
IsBenchmarking string
IsDocumentation string
IsGlobal bool
IsIetfProtocolAssignment string
IsShared string
IsUnicastLinkLocal bool
IsUnicastSiteLocal string
IsUniqueLocal string
McScopeAdminLocal string
McScopeGlobal string
Expand All @@ -44,10 +42,8 @@ func main() {
"<unsupported>", // IsBenchmarking
"<unsupported>", // IsDocumentation
ip.IsGlobalUnicast(), // IsGlobal
"<unsupported>", // IsIetfProtocolAssignment
"<unsupported>", // IsShared
ip.IsLinkLocalUnicast(), // IsUnicastLinkLocal
"<unsupported>", // IsUnicastSiteLocal
"<unsupported>", // IsUniqueLocal
"<unsupported>", // McScopeAdminLocal
"<unsupported>", // McScopeGlobal
Expand Down Expand Up @@ -75,10 +71,8 @@ func main() {
output = strings.Replace(output, "IsBenchmarking", "is_benchmarking", 1)
output = strings.Replace(output, "IsDocumentation", "is_documentation", 1)
output = strings.Replace(output, "IsGlobal", "is_global", 1)
output = strings.Replace(output, "IsIetfProtocolAssignment", "is_ietf_protocol_assignment", 1)
output = strings.Replace(output, "IsShared", "is_shared", 1)
output = strings.Replace(output, "IsUnicastLinkLocal", "is_unicast_link_local", 1)
output = strings.Replace(output, "IsUnicastSiteLocal", "is_unicast_site_local", 1)
output = strings.Replace(output, "IsUniqueLocal", "is_unique_local", 1)
output = strings.Replace(output, "McScopeAdminLocal", "mc_scope_admin_local", 1)
output = strings.Replace(output, "McScopeGlobal", "mc_scope_global", 1)
Expand Down
2 changes: 0 additions & 2 deletions tools/ipcheck/impls/java/IPCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ public static void main(String []args) throws Exception {
.append("\"is_benchmarking\":").append("\"<unsupported>\"").append(",")
.append("\"is_documentation\":").append("\"<unsupported>\"").append(",")
.append("\"is_global\":").append("\"<unsupported>\"").append(",")
.append("\"is_ietf_protocol_assignment\":").append("\"<unsupported>\"").append(",")
.append("\"is_shared\":").append("\"<unsupported>\"").append(",")
.append("\"is_unicast_link_local\":").append("\"<unsupported>\"").append(",")
.append("\"is_unicast_site_local\":").append("\"<unsupported>\"").append(",")
.append("\"is_unique_local\":").append("\"<unsupported>\"").append(",")
.append("\"mc_scope_admin_local\":").append("\"<unsupported>\"").append(",")
.append("\"mc_scope_global\":").append(addr.isMCGlobal()).append(",")
Expand Down
2 changes: 0 additions & 2 deletions tools/ipcheck/impls/python/ipcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
'is_benchmarking': "<unsupported>",
'is_documentation': "<unsupported>",
'is_global': addr.is_global,
'is_ietf_protocol_assignment': "<unsupported>",
'is_shared': "<unsupported>",
'is_unicast_link_local': addr.is_link_local,
'is_unicast_site_local': addr.is_site_local if addr.version == 6 else "<unsupported>",
'is_unique_local': "<unsupported>",
'mc_scope_admin_local': "<unsupported>",
'mc_scope_global': "<unsupported>",
Expand Down
8 changes: 0 additions & 8 deletions tools/ipcheck/impls/rust_current/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ fn main() {
IpAddr::V4(addr) => addr.is_reserved(),
IpAddr::V6(_) => false,
},
"is_ietf_protocol_assignment": match addr {
IpAddr::V4(addr) => addr.is_ietf_protocol_assignment(),
IpAddr::V6(_) => false,
},
"is_benchmarking": match addr {
IpAddr::V4(addr) => addr.is_benchmarking(),
IpAddr::V6(_) => false,
Expand All @@ -48,10 +44,6 @@ fn main() {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.is_unique_local(),
},
"is_unicast_site_local": match addr {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.is_unicast_site_local(),
},
"mc_scope_iface_local": match addr {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.multicast_scope() == Some(Ipv6MulticastScope::InterfaceLocal),
Expand Down
8 changes: 0 additions & 8 deletions tools/ipcheck/impls/rust_new/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ fn main() {
IpAddr::V4(addr) => addr.is_reserved(),
IpAddr::V6(_) => false,
},
"is_ietf_protocol_assignment": match addr {
IpAddr::V4(addr) => addr.is_ietf_protocol_assignment(),
IpAddr::V6(_) => false,
},
"is_benchmarking": match addr {
IpAddr::V4(addr) => addr.is_benchmarking(),
IpAddr::V6(_) => false,
Expand Down Expand Up @@ -79,10 +75,6 @@ fn main() {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.is_unique_local(),
},
"is_unicast_site_local": match addr {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.is_unicast_site_local(),
},
"mc_scope_iface_local": match addr {
IpAddr::V4(_) => false,
IpAddr::V6(addr) => addr.multicast_scope() == Some(Ipv6MulticastScope::InterfaceLocal),
Expand Down

0 comments on commit 47f89e0

Please sign in to comment.