Browse Source

Fix clippy and rust warnings

tags/v0.3.1-rc6
haixuanTao 2 years ago
parent
commit
4978f800a6
4 changed files with 11 additions and 10 deletions
  1. +4
    -4
      Cargo.lock
  2. +5
    -3
      apis/rust/operator/src/raw.rs
  3. +1
    -1
      apis/rust/operator/types/Cargo.toml
  4. +1
    -2
      binaries/daemon/src/spawn.rs

+ 4
- 4
Cargo.lock View File

@@ -4881,9 +4881,9 @@ checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072"

[[package]]
name = "safer-ffi"
version = "0.1.3"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9c1d19b288ca9898cd421c7b105fb7269918a7f8e9253a991e228981ca421ad"
checksum = "395ace5aff9629c7268ca8255aceb945525b2cb644015f3caec5131a6a537c11"
dependencies = [
"inventory 0.1.11",
"inventory 0.3.12",
@@ -4899,9 +4899,9 @@ dependencies = [

[[package]]
name = "safer_ffi-proc_macros"
version = "0.1.3"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d7a04caa3ca2224f5ea4ddd850e2629c3b36b2b83621f87a8303bf41020110"
checksum = "9255504d5467bae9e07d58b8de446ba6739b29bf72e1fa35b2387e30d29dcbfe"
dependencies = [
"macro_rules_attribute",
"prettyplease",


+ 5
- 3
apis/rust/operator/src/raw.rs View File

@@ -24,7 +24,7 @@ pub unsafe fn dora_init_operator<O: DoraOperator>() -> DoraInitResult {

pub unsafe fn dora_drop_operator<O>(operator_context: *mut c_void) -> DoraResult {
let raw: *mut O = operator_context.cast();
unsafe { Box::from_raw(raw) };
let _ = unsafe { Box::from_raw(raw) };
DoraResult { error: None }
}

@@ -40,10 +40,12 @@ pub unsafe fn dora_on_event<O: DoraOperator>(
let event_variant = if let Some(input) = &mut event.input {
let Some(data_array) = input.data_array.take() else {
return OnEventResult {
result: DoraResult { error: Some("data already taken".to_string().into()) },
result: DoraResult {
error: Some("data already taken".to_string().into()),
},
status: DoraStatus::Continue,
};
};
};
let data = arrow::ffi::from_ffi(data_array, &input.schema);

match data {


+ 1
- 1
apis/rust/operator/types/Cargo.toml View File

@@ -13,5 +13,5 @@ arrow = { workspace = true, features = ["ffi"] }
dora-arrow-convert = { workspace = true }

[dependencies.safer-ffi]
version = "0.1.3"
version = "0.1.4"
features = ["headers", "inventory-0-3-1"]

+ 1
- 2
binaries/daemon/src/spawn.rs View File

@@ -93,8 +93,7 @@ pub async fn spawn_node(
}
_ => {
tracing::info!("spawning: {}", resolved_path.display());
let cmd = tokio::process::Command::new(&resolved_path);
cmd
tokio::process::Command::new(&resolved_path)
}
};



Loading…
Cancel
Save