Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: turborepo unused code lints #4727

Merged
merged 2 commits into from Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/globwatch/src/lib.rs
Expand Up @@ -36,7 +36,7 @@ pub use notify::{Error, Event, Watcher};
pub use stop_token::{stream::StreamExt, StopSource, StopToken, TimedOutError};
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
use tokio_stream::wrappers::UnboundedReceiverStream;
use tracing::{event, span, trace, warn, Id, Level, Span};
use tracing::{event, span, trace, warn, Id, Level};

/// A wrapper around notify that allows for glob-based watching.
#[derive(Debug)]
Expand Down
2 changes: 2 additions & 0 deletions crates/turborepo-lib/src/daemon/bump_timeout.rs
Expand Up @@ -32,10 +32,12 @@ impl BumpTimeout {
Duration::from_millis(self.deadline.load(Ordering::Relaxed))
}

#[allow(dead_code)]
pub fn deadline(&self) -> Instant {
self.start + self.duration()
}

#[allow(dead_code)]
pub fn elapsed(&self) -> Duration {
self.start.elapsed()
}
Expand Down
14 changes: 5 additions & 9 deletions crates/turborepo-lib/src/daemon/endpoint.rs
@@ -1,11 +1,6 @@
use std::{
io::ErrorKind,
sync::{
atomic::{AtomicBool, Ordering},
Arc,
},
time::Duration,
};
use std::sync::{atomic::AtomicBool, Arc};
#[cfg(windows)]
use std::{io::ErrorKind, sync::atomic::Ordering, time::Duration};

use futures::Stream;
use tokio::io::{AsyncRead, AsyncWrite};
Expand All @@ -21,6 +16,7 @@ pub enum SocketOpenError {
LockError(#[from] pidlock::PidlockError),
}

#[cfg(windows)]
const WINDOWS_POLL_DURATION: Duration = Duration::from_millis(1);

/// Gets a stream of incoming connections from a Unix socket.
Expand All @@ -31,7 +27,7 @@ const WINDOWS_POLL_DURATION: Duration = Duration::from_millis(1);
/// code path to shut down the non-blocking polling
pub async fn open_socket(
path: AbsoluteSystemPathBuf,
running: Arc<AtomicBool>,
#[allow(unused)] running: Arc<AtomicBool>,
) -> Result<
(
pidlock::Pidlock,
Expand Down