Skip to content

Commit f7a6d69

Browse files
committed
chore: fix some compiler warnings
Signed-off-by: Andrew Lamb <[email protected]>
1 parent bc09ff3 commit f7a6d69

File tree

9 files changed

+4
-31
lines changed

9 files changed

+4
-31
lines changed

crates/aws/src/credentials.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ impl AWSForObjectStore {
4141
}
4242

4343
/// Return true if a credential has been cached
44+
#[cfg(test)]
4445
async fn has_cached_credentials(&self) -> bool {
4546
let guard = self.cache.lock().await;
4647
(*guard).is_some()

crates/core/src/kernel/models/fields.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,6 @@ static REMOVE_FIELD: LazyLock<StructField> = LazyLock::new(|| {
145145
true,
146146
)
147147
});
148-
static REMOVE_FIELD_CHECKPOINT: LazyLock<StructField> = LazyLock::new(|| {
149-
StructField::new(
150-
"remove",
151-
StructType::new(vec![
152-
StructField::new("path", DataType::STRING, false),
153-
StructField::new("deletionTimestamp", DataType::LONG, true),
154-
StructField::new("dataChange", DataType::BOOLEAN, false),
155-
]),
156-
true,
157-
)
158-
});
159148
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#add-cdc-file
160149
static CDC_FIELD: LazyLock<StructField> = LazyLock::new(|| {
161150
StructField::new(

crates/core/src/operations/filesystem_check.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use futures::future::BoxFuture;
2222
use futures::StreamExt;
2323
pub use object_store::path::Path;
2424
use object_store::ObjectStore;
25-
use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize, Serializer};
25+
use serde::{Serialize, Serializer};
2626
use url::{ParseError, Url};
2727
use uuid::Uuid;
2828

@@ -79,15 +79,6 @@ where
7979
serializer.serialize_str(&json_string)
8080
}
8181

82-
// Custom deserialization that parses a JSON string into MetricDetails
83-
fn deserialize_vec_string<'de, D>(deserializer: D) -> Result<Vec<String>, D::Error>
84-
where
85-
D: Deserializer<'de>,
86-
{
87-
let s: String = Deserialize::deserialize(deserializer)?;
88-
serde_json::from_str(&s).map_err(DeError::custom)
89-
}
90-
9182
fn is_absolute_path(path: &str) -> DeltaResult<bool> {
9283
match Url::parse(path) {
9384
Ok(_) => Ok(true),

crates/core/src/operations/load_cdf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ pub(crate) mod tests {
487487
use arrow_array::{Int32Array, RecordBatch, StringArray};
488488
use arrow_schema::Schema;
489489
use chrono::NaiveDateTime;
490-
use datafusion::physical_plan::ExecutionPlan;
491490
use datafusion::prelude::SessionContext;
492491
use datafusion_common::assert_batches_sorted_eq;
493492
use itertools::Itertools;

crates/core/src/operations/merge/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,6 @@ mod tests {
15731573
use arrow_schema::DataType as ArrowDataType;
15741574
use arrow_schema::Field;
15751575
use datafusion::assert_batches_sorted_eq;
1576-
use datafusion::physical_plan::ExecutionPlan;
15771576
use datafusion::prelude::*;
15781577
use datafusion_common::Column;
15791578
use datafusion_common::TableReference;

crates/core/src/operations/transaction/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
//! └───────────────────────────────┘
7575
//!</pre>
7676
use std::collections::HashMap;
77-
use std::future::Future;
7877
use std::sync::Arc;
7978

8079
use bytes::Bytes;

crates/core/src/operations/update.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ mod tests {
553553
use arrow::record_batch::RecordBatch;
554554
use arrow_schema::DataType;
555555
use datafusion::assert_batches_sorted_eq;
556-
use datafusion::physical_plan::ExecutionPlan;
557556
use datafusion::prelude::*;
558557
use serde_json::json;
559558
use std::sync::Arc;

crates/core/src/operations/write/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ mod tests {
757757
use arrow_schema::{DataType, Field, Fields, Schema as ArrowSchema, TimeUnit};
758758
use datafusion::prelude::*;
759759
use datafusion::{assert_batches_eq, assert_batches_sorted_eq};
760-
use datafusion_physical_plan::ExecutionPlan;
761760
use itertools::Itertools;
762761
use serde_json::{json, Value};
763762

crates/lakefs/src/storage.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,11 @@ mod tests {
121121
use maplit::hashmap;
122122
use serial_test::serial;
123123

124-
struct ScopedEnv {
125-
vars: HashMap<std::ffi::OsString, std::ffi::OsString>,
126-
}
124+
struct ScopedEnv {}
127125

128126
impl ScopedEnv {
129127
pub fn new() -> Self {
130-
let vars = std::env::vars_os().collect();
131-
Self { vars }
128+
Self {}
132129
}
133130

134131
pub fn run<T>(mut f: impl FnMut() -> T) -> T {

0 commit comments

Comments
 (0)