Skip to content

Commit

Permalink
uprev deps and stricter linting (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Jun 27, 2024
1 parent e53eda9 commit 3038aa3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 2 additions & 4 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 @@ -31,11 +31,9 @@ tokio = { version = "1.37", features = ["full"] }
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 3038aa3

Please sign in to comment.