Skip to content

Commit

Permalink
Fixes for rust 1.80.0
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jul 27, 2024
1 parent 1e3a396 commit 1027752
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions glide-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nanoid = "0.4.0"

[features]
socket-layer = ["directories", "integer-encoding", "num_cpus", "protobuf", "tokio-util"]
standalone_heartbeat = []

[dev-dependencies]
rsevents = "0.3.1"
Expand Down
8 changes: 4 additions & 4 deletions glide-core/src/client/standalone_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::reconnecting_connection::ReconnectingConnection;
use super::{ConnectionRequest, NodeAddress, TlsMode};
use crate::retry_strategies::RetryStrategy;
use futures::{future, stream, StreamExt};
#[cfg(standalone_heartbeat)]
#[cfg(feature = "standalone_heartbeat")]
use logger_core::log_debug;
use logger_core::log_warn;
use rand::Rng;
Expand All @@ -15,7 +15,7 @@ use redis::{PushInfo, RedisError, RedisResult, Value};
use std::sync::atomic::AtomicUsize;
use std::sync::Arc;
use tokio::sync::mpsc;
#[cfg(standalone_heartbeat)]
#[cfg(feature = "standalone_heartbeat")]
use tokio::task;

#[derive(Debug)]
Expand Down Expand Up @@ -185,7 +185,7 @@ impl StandaloneClient {
}
let read_from = get_read_from(connection_request.read_from);

#[cfg(standalone_heartbeat)]
#[cfg(feature = "standalone_heartbeat")]
for node in nodes.iter() {
Self::start_heartbeat(node.clone());
}
Expand Down Expand Up @@ -363,7 +363,7 @@ impl StandaloneClient {
}
}

#[cfg(standalone_heartbeat)]
#[cfg(feature = "standalone_heartbeat")]
fn start_heartbeat(reconnecting_connection: ReconnectingConnection) {
task::spawn(async move {
loop {
Expand Down
2 changes: 1 addition & 1 deletion glide-core/tests/test_standalone_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ mod standalone_client_tests {
#[rstest]
#[serial_test::serial]
#[timeout(LONG_STANDALONE_TEST_TIMEOUT)]
#[cfg(standalone_heartbeat)]
#[cfg(feature = "standalone_heartbeat")]
fn test_detect_disconnect_and_reconnect_using_heartbeat(#[values(false, true)] use_tls: bool) {
let (sender, receiver) = tokio::sync::oneshot::channel();
block_on_all(async move {
Expand Down
2 changes: 1 addition & 1 deletion logger_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test-env-helpers = "0.2.2"

[dependencies]
tracing = "0.1"
tracing-appender = "0.2.2"
tracing-appender = { version = "0.2.3", default-features = false }
once_cell = "1.16.0"
file-rotate = "0.7.1"
tracing-subscriber = "0.3.17"

0 comments on commit 1027752

Please sign in to comment.