Skip to content

Commit

Permalink
chore: Fix some compiler warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Lamb <[email protected]>
  • Loading branch information
alamb committed Feb 24, 2025
1 parent bc09ff3 commit 2d8043f
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 31 deletions.
1 change: 1 addition & 0 deletions crates/aws/src/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ impl AWSForObjectStore {
}

/// Return true if a credential has been cached
#[cfg(test)]
async fn has_cached_credentials(&self) -> bool {
let guard = self.cache.lock().await;
(*guard).is_some()
Expand Down
11 changes: 0 additions & 11 deletions crates/core/src/kernel/models/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,6 @@ static REMOVE_FIELD: LazyLock<StructField> = LazyLock::new(|| {
true,
)
});
static REMOVE_FIELD_CHECKPOINT: LazyLock<StructField> = LazyLock::new(|| {
StructField::new(
"remove",
StructType::new(vec![
StructField::new("path", DataType::STRING, false),
StructField::new("deletionTimestamp", DataType::LONG, true),
StructField::new("dataChange", DataType::BOOLEAN, false),
]),
true,
)
});
// https://github.com/delta-io/delta/blob/master/PROTOCOL.md#add-cdc-file
static CDC_FIELD: LazyLock<StructField> = LazyLock::new(|| {
StructField::new(
Expand Down
11 changes: 1 addition & 10 deletions crates/core/src/operations/filesystem_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use futures::future::BoxFuture;
use futures::StreamExt;
pub use object_store::path::Path;
use object_store::ObjectStore;
use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize, Serializer};
use serde::{Serialize, Serializer};
use url::{ParseError, Url};
use uuid::Uuid;

Expand Down Expand Up @@ -79,15 +79,6 @@ where
serializer.serialize_str(&json_string)
}

// Custom deserialization that parses a JSON string into MetricDetails
fn deserialize_vec_string<'de, D>(deserializer: D) -> Result<Vec<String>, D::Error>
where
D: Deserializer<'de>,
{
let s: String = Deserialize::deserialize(deserializer)?;
serde_json::from_str(&s).map_err(DeError::custom)
}

fn is_absolute_path(path: &str) -> DeltaResult<bool> {
match Url::parse(path) {
Ok(_) => Ok(true),
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations/load_cdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ pub(crate) mod tests {
use arrow_array::{Int32Array, RecordBatch, StringArray};
use arrow_schema::Schema;
use chrono::NaiveDateTime;
use datafusion::physical_plan::ExecutionPlan;
use datafusion::prelude::SessionContext;
use datafusion_common::assert_batches_sorted_eq;
use itertools::Itertools;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations/merge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,6 @@ mod tests {
use arrow_schema::DataType as ArrowDataType;
use arrow_schema::Field;
use datafusion::assert_batches_sorted_eq;
use datafusion::physical_plan::ExecutionPlan;
use datafusion::prelude::*;
use datafusion_common::Column;
use datafusion_common::TableReference;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations/transaction/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
//! └───────────────────────────────┘
//!</pre>
use std::collections::HashMap;
use std::future::Future;
use std::sync::Arc;

use bytes::Bytes;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ mod tests {
use arrow::record_batch::RecordBatch;
use arrow_schema::DataType;
use datafusion::assert_batches_sorted_eq;
use datafusion::physical_plan::ExecutionPlan;
use datafusion::prelude::*;
use serde_json::json;
use std::sync::Arc;
Expand Down
1 change: 0 additions & 1 deletion crates/core/src/operations/write/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,6 @@ mod tests {
use arrow_schema::{DataType, Field, Fields, Schema as ArrowSchema, TimeUnit};
use datafusion::prelude::*;
use datafusion::{assert_batches_eq, assert_batches_sorted_eq};
use datafusion_physical_plan::ExecutionPlan;
use itertools::Itertools;
use serde_json::{json, Value};

Expand Down
7 changes: 2 additions & 5 deletions crates/lakefs/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,11 @@ mod tests {
use maplit::hashmap;
use serial_test::serial;

struct ScopedEnv {
vars: HashMap<std::ffi::OsString, std::ffi::OsString>,
}
struct ScopedEnv {}

impl ScopedEnv {
pub fn new() -> Self {
let vars = std::env::vars_os().collect();
Self { vars }
Self {}
}

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

0 comments on commit 2d8043f

Please sign in to comment.