Skip to content

Commit

Permalink
Merge fixups
Browse files Browse the repository at this point in the history
Signed-off-by: ikolomi <[email protected]>
  • Loading branch information
ikolomi committed Dec 4, 2024
1 parent 5b9fe12 commit 059bd2f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion glide-core/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/

#[cfg(feature = "socket-layer")]
fn build_protobuf() {
let customization_options = protobuf_codegen::Customize::default()
Expand Down
2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<'a> Input<'a> {
}
}

impl<'a> Routable for Input<'a> {
impl Routable for Input<'_> {
fn arg_idx(&self, idx: usize) -> Option<&[u8]> {
match self {
Input::Slice { cmd: _, routable } => routable.arg_idx(idx),
Expand Down
2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/cluster_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ impl ShardAddrs {
}
}

impl<'a> IntoIterator for &'a ShardAddrs {
impl IntoIterator for &ShardAddrs {
type Item = Arc<String>;
type IntoIter = std::iter::Chain<Once<Arc<String>>, std::vec::IntoIter<Arc<String>>>;

Expand Down
2 changes: 1 addition & 1 deletion glide-core/redis-rs/redis/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct Iter<'a, T: FromRedisValue> {
cmd: Cmd,
}

impl<'a, T: FromRedisValue> Iterator for Iter<'a, T> {
impl<T: FromRedisValue> Iterator for Iter<'_, T> {
type Item = T;

#[inline]
Expand Down
1 change: 0 additions & 1 deletion glide-core/redis-rs/redis/src/commands/cluster_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use strum_macros::Display;
/// The [[`ScanState`]] struct represents the state of a scan operation in a Redis cluster.
/// It holds information about the current scan state, including the cursor position, scanned slots map,
/// address being scanned, and address's epoch.
const BITS_PER_U64: usize = u64::BITS as usize;
const NUM_OF_SLOTS: usize = SLOT_SIZE as usize;
const BITS_ARRAY_SIZE: usize = NUM_OF_SLOTS / BITS_PER_U64;
Expand Down
4 changes: 2 additions & 2 deletions glide-core/redis-rs/redis/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl IntoConnectionInfo for ConnectionInfo {
/// - Specifying DB: `redis://127.0.0.1:6379/0`
/// - Enabling TLS: `rediss://127.0.0.1:6379`
/// - Enabling Insecure TLS: `rediss://127.0.0.1:6379/#insecure`
impl<'a> IntoConnectionInfo for &'a str {
impl IntoConnectionInfo for &str {
fn into_connection_info(self) -> RedisResult<ConnectionInfo> {
match parse_redis_url(self) {
Some(u) => u.into_connection_info(),
Expand Down Expand Up @@ -1578,7 +1578,7 @@ impl<'a> PubSub<'a> {
}
}

impl<'a> Drop for PubSub<'a> {
impl Drop for PubSub<'_> {
fn drop(&mut self) {
let _ = self.con.exit_pubsub();
}
Expand Down
4 changes: 2 additions & 2 deletions glide-core/redis-rs/redis/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ impl ToRedisArgs for String {
}
}

impl<'a> ToRedisArgs for &'a str {
impl ToRedisArgs for &str {
fn write_redis_args<W>(&self, out: &mut W)
where
W: ?Sized + RedisWrite,
Expand All @@ -1465,7 +1465,7 @@ impl<T: ToRedisArgs> ToRedisArgs for Vec<T> {
}
}

impl<'a, T: ToRedisArgs> ToRedisArgs for &'a [T] {
impl<T: ToRedisArgs> ToRedisArgs for &[T] {
fn write_redis_args<W>(&self, out: &mut W)
where
W: ?Sized + RedisWrite,
Expand Down
4 changes: 2 additions & 2 deletions node/rust-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use glide_core::Telemetry;
use redis::GlideConnectionOptions;
/**
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use glide_core::Telemetry;
use redis::GlideConnectionOptions;

#[cfg(not(target_env = "msvc"))]
use tikv_jemallocator::Jemalloc;
Expand Down
4 changes: 2 additions & 2 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use bytes::Bytes;
use glide_core::client::FINISHED_SCAN_CURSOR;
/**
* Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
*/
use bytes::Bytes;
use glide_core::client::FINISHED_SCAN_CURSOR;
use glide_core::start_socket_listener;
use glide_core::Telemetry;
use glide_core::MAX_REQUEST_ARGS_LENGTH;
Expand Down

0 comments on commit 059bd2f

Please sign in to comment.