Skip to content

Commit

Permalink
fix clippy (apache#6791)
Browse files Browse the repository at this point in the history
  • Loading branch information
psvri authored and alamb committed Jan 4, 2025
1 parent f5b51ff commit 1c26fea
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arrow-ord/src/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ pub fn make_comparator(
}

#[cfg(test)]
pub mod tests {
mod tests {
use super::*;
use arrow_array::builder::{Int32Builder, ListBuilder};
use arrow_buffer::{i256, IntervalDayTime, OffsetBuffer};
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/aws/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct SessionCredential<'a> {
config: &'a S3Config,
}

impl<'a> SessionCredential<'a> {
impl SessionCredential<'_> {
fn authorizer(&self) -> Option<AwsAuthorizer<'_>> {
let mut authorizer =
AwsAuthorizer::new(self.credential.as_deref()?, "s3", &self.config.region)
Expand Down
2 changes: 1 addition & 1 deletion object_store/src/aws/dynamo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ enum ReturnValues {
/// This provides cheap, ordered serialization of maps
struct Map<'a, K, V>(&'a [(K, V)]);

impl<'a, K: Serialize, V: Serialize> Serialize for Map<'a, K, V> {
impl<K: Serialize, V: Serialize> Serialize for Map<'_, K, V> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
Expand Down
8 changes: 6 additions & 2 deletions object_store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ fn get_inode(metadata: &Metadata) -> u64 {

#[cfg(not(unix))]
/// On platforms where an inode isn't available, fallback to just relying on size and mtime
fn get_inode(metadata: &Metadata) -> u64 {
fn get_inode(_metadata: &Metadata) -> u64 {
0
}

Expand Down Expand Up @@ -1060,7 +1060,10 @@ mod tests {
use std::fs;

use futures::TryStreamExt;
use tempfile::{NamedTempFile, TempDir};
use tempfile::TempDir;

#[cfg(target_family = "unix")]
use tempfile::NamedTempFile;

use crate::integration::*;

Expand Down Expand Up @@ -1248,6 +1251,7 @@ mod tests {
fs.list_with_delimiter(None).await.unwrap();
}

#[cfg(target_family = "unix")]
async fn check_list(integration: &LocalFileSystem, prefix: Option<&Path>, expected: &[&str]) {
let result: Vec<_> = integration.list(prefix).try_collect().await.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion object_store/src/path/parts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl From<String> for PathPart<'static> {
}
}

impl<'a> AsRef<str> for PathPart<'a> {
impl AsRef<str> for PathPart<'_> {
fn as_ref(&self) -> &str {
self.raw.as_ref()
}
Expand Down

0 comments on commit 1c26fea

Please sign in to comment.