From 0257e92c4a6acd5ae802b364a96e1db3e16f39b9 Mon Sep 17 00:00:00 2001 From: Kotauskas Date: Wed, 12 Jun 2024 21:12:05 +0300 Subject: [PATCH] eugh --- examples/unnamed_pipe/sync/main.rs | 4 ++-- examples/unnamed_pipe/sync/side_a.rs | 4 +++- examples/unnamed_pipe/sync/side_b.rs | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/unnamed_pipe/sync/main.rs b/examples/unnamed_pipe/sync/main.rs index 363d810..b8f58a3 100644 --- a/examples/unnamed_pipe/sync/main.rs +++ b/examples/unnamed_pipe/sync/main.rs @@ -5,9 +5,9 @@ use std::{io, sync::mpsc, thread}; fn main() -> io::Result<()> { let (htx, hrx) = mpsc::sync_channel(1); - let jh = thread::spawn(move || side_a::main(htx)); + let jh = thread::spawn(move || side_a::emain(htx)); let handle = hrx.recv().unwrap(); - side_b::main(handle)?; + side_b::emain(handle)?; jh.join().unwrap() } diff --git a/examples/unnamed_pipe/sync/side_a.rs b/examples/unnamed_pipe/sync/side_a.rs index a3a5aaf..0fa50b2 100644 --- a/examples/unnamed_pipe/sync/side_a.rs +++ b/examples/unnamed_pipe/sync/side_a.rs @@ -4,7 +4,7 @@ use std::{io, os, sync::mpsc}; type Handle = os::windows::io::OwnedHandle; #[cfg(unix)] type Handle = os::unix::io::OwnedFd; -pub(super) fn main(handle_sender: mpsc::SyncSender) -> io::Result<()> { +pub(crate) fn emain(handle_sender: mpsc::SyncSender) -> io::Result<()> { //} use interprocess::unnamed_pipe::pipe; use std::io::{prelude::*, BufReader}; @@ -33,3 +33,5 @@ pub(super) fn main(handle_sender: mpsc::SyncSender) -> io::Result<()> { //{ Ok(()) } //} +#[allow(dead_code)] +fn main() {} diff --git a/examples/unnamed_pipe/sync/side_b.rs b/examples/unnamed_pipe/sync/side_b.rs index 5e9bb61..3e80b51 100644 --- a/examples/unnamed_pipe/sync/side_b.rs +++ b/examples/unnamed_pipe/sync/side_b.rs @@ -4,7 +4,7 @@ use std::{io, os}; type Handle = os::windows::io::OwnedHandle; #[cfg(unix)] type Handle = os::unix::io::OwnedFd; -pub(super) fn main(handle: Handle) -> io::Result<()> { +pub(crate) fn emain(handle: Handle) -> io::Result<()> { //} use interprocess::unnamed_pipe; use std::io::prelude::*; @@ -20,3 +20,5 @@ pub(super) fn main(handle: Handle) -> io::Result<()> { //{ Ok(()) } //} +#[allow(dead_code)] +fn main() {}