Skip to content

Commit

Permalink
examples: allow dead code for other than Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
thvdveld committed Sep 16, 2024
1 parent 0106262 commit d576a90
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use std::cmp;
Expand Down
2 changes: 2 additions & 0 deletions examples/client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use log::debug;
Expand Down
2 changes: 2 additions & 0 deletions examples/dhcp_client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]
#![allow(clippy::option_map_unit_fn)]

mod utils;

use log::*;
Expand Down
2 changes: 2 additions & 0 deletions examples/dns.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use smoltcp::iface::{Config, Interface, SocketSet};
Expand Down
2 changes: 2 additions & 0 deletions examples/httpclient.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use log::debug;
Expand Down
2 changes: 2 additions & 0 deletions examples/multicast.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use std::os::unix::io::AsRawFd;
Expand Down
2 changes: 2 additions & 0 deletions examples/multicast6.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use std::os::unix::io::AsRawFd;
Expand Down
2 changes: 2 additions & 0 deletions examples/ping.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use byteorder::{ByteOrder, NetworkEndian};
Expand Down
2 changes: 2 additions & 0 deletions examples/server.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(target_os = "linux", target_os = "android")), allow(dead_code))]

mod utils;

use log::debug;
Expand Down

0 comments on commit d576a90

Please sign in to comment.