Skip to content

Commit

Permalink
uprev deps and stricter linting
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Jun 27, 2024
1 parent e53eda9 commit 0d07a15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ arrow = "52"
arrow-schema = "52"
datafusion-common = "39"
datafusion-expr = "39"
jiter = "0.4"
jiter = "0.5"
paste = "1"
log = "0.4"
datafusion-execution = "39"
Expand All @@ -24,18 +24,16 @@ datafusion-execution = "39"
codspeed-criterion-compat = "2.3"
criterion = "0.5.1"
datafusion = "39"
clap = "~4.4" # for testing on MSRV 1.73
clap = "4" # for testing on MSRV 1.73
tokio = { version = "1.37", features = ["full"] }

[lints.clippy]
dbg_macro = "deny"
print_stdout = "deny"

# in general we lint against the pedantic group, but we will whitelist
# in general, we lint against the pedantic group, but we will whitelist
# certain lints which we don't want to enforce (for now)
pedantic = { level = "deny", priority = -1 }
missing_errors_doc = "allow"
cast_possible_truncation = "allow"

[[bench]]
name = "main"
Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub enum JsonPath<'s> {

impl From<u64> for JsonPath<'_> {
fn from(index: u64) -> Self {
JsonPath::Index(index as usize)
JsonPath::Index(usize::try_from(index).unwrap())
}
}

Expand Down
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ pub mod udfs {
pub use crate::json_length::json_length_udf;
}

/// Register all JSON UDFs
/// Register all JSON UDFs, and [`rewrite::JsonFunctionRewriter`] with the provided [`FunctionRegistry`].
///
/// # Arguments
///
/// * `registry`: `FunctionRegistry` to register the UDFs
///
/// # Errors
///
/// Returns an error if the UDFs cannot be registered or if the rewriter cannot be registered.
pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> {
let functions: Vec<Arc<ScalarUDF>> = vec![
json_get::json_get_udf(),
Expand Down

0 comments on commit 0d07a15

Please sign in to comment.