Repository: rust-lang/socket2
Pull request #314 (2022-06-16 00:16:16)

Fix typo (fuschia -> fuchsia)


Patch:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 828f425..b865720 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,7 +48,7 @@ where each block contains a single level. The methods in these block are sorted
 based on the option name, e.g. `IP_ADD_MEMBERSHIP` rather than
 `join_multicast_v4`. Finally the last block contains platforms specific methods
 such as `Socket::freebind` which is (at the time of writing) only available on
-Android, Linux and Fuschia, which is defined in the `src/sys/*.rs` files.
+Android, Linux and Fuchsia, which is defined in the `src/sys/*.rs` files.
 
 Other types are mostly defined in `src/lib.rs`, except for `SockAddr` and
 `SockRef` which have there own file. These types follow the same structure as
diff --git a/src/socket.rs b/src/socket.rs
index ae7ef40..c5cca84 100644
--- a/src/socket.rs
+++ b/src/socket.rs
@@ -1360,7 +1360,7 @@ impl Socket {
     /// NOTE: <https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options>
     /// documents that not all versions of windows support `IP_TOS`.
     #[cfg(not(any(
-        target_os = "fuschia",
+        target_os = "fuchsia",
         target_os = "redox",
         target_os = "solaris",
         target_os = "illumos",
@@ -1378,7 +1378,7 @@ impl Socket {
     ///
     /// [`set_tos`]: Socket::set_tos
     #[cfg(not(any(
-        target_os = "fuschia",
+        target_os = "fuchsia",
         target_os = "redox",
         target_os = "solaris",
         target_os = "illumos",
@@ -1395,7 +1395,7 @@ impl Socket {
     /// incoming packets. It contains a byte which specifies the
     /// Type of Service/Precedence field of the packet header.
     #[cfg(not(any(
-        target_os = "fuschia",
+        target_os = "fuchsia",
         target_os = "illumos",
         target_os = "netbsd",
         target_os = "openbsd",
@@ -1421,7 +1421,7 @@ impl Socket {
     ///
     /// [`set_recv_tos`]: Socket::set_recv_tos
     #[cfg(not(any(
-        target_os = "fuschia",
+        target_os = "fuchsia",
         target_os = "illumos",
         target_os = "netbsd",
         target_os = "openbsd",
diff --git a/src/sys/unix.rs b/src/sys/unix.rs
index 310b91c..13e0966 100644
--- a/src/sys/unix.rs
+++ b/src/sys/unix.rs
@@ -78,7 +78,7 @@ pub(crate) use libc::{MSG_TRUNC, SO_OOBINLINE};
 #[cfg(all(feature = "all", not(target_os = "redox")))]
 pub(crate) use libc::IP_HDRINCL;
 #[cfg(not(any(
-    target_os = "fuschia",
+    target_os = "fuchsia",
     target_os = "illumos",
     target_os = "netbsd",
     target_os = "openbsd",
@@ -87,7 +87,7 @@ pub(crate) use libc::IP_HDRINCL;
 )))]
 pub(crate) use libc::IP_RECVTOS;
 #[cfg(not(any(
-    target_os = "fuschia",
+    target_os = "fuchsia",
     target_os = "redox",
     target_os = "solaris",
     target_os = "illumos",


Test patch:
diff --git a/tests/socket.rs b/tests/socket.rs
index 6fd22ae..2d6cafe 100644
--- a/tests/socket.rs
+++ b/tests/socket.rs
@@ -1162,7 +1162,7 @@ test!(IPv6 freebind_ipv6, set_freebind_ipv6(true));
 test!(IPv4 ttl, set_ttl(40));
 
 #[cfg(not(any(
-    target_os = "fuschia",
+    target_os = "fuchsia",
     target_os = "redox",
     target_os = "solaris",
     target_os = "illumos",
@@ -1170,7 +1170,7 @@ test!(IPv4 ttl, set_ttl(40));
 test!(IPv4 tos, set_tos(96));
 
 #[cfg(not(any(
-    target_os = "fuschia",
+    target_os = "fuchsia",
     target_os = "illumos",
     target_os = "netbsd",
     target_os = "redox",