Browse Source

Fix clippy warnings

tags/v0.1.1-test-9-python-runtime
haixuanTao 3 years ago
parent
commit
b15d25b9a3
6 changed files with 4 additions and 8 deletions
  1. +0
    -1
      apis/rust/node/src/lib.rs
  2. +0
    -1
      binaries/cli/src/check.rs
  3. +2
    -2
      binaries/cli/src/template/cxx/mod.rs
  4. +0
    -2
      binaries/runtime/src/main.rs
  5. +1
    -1
      binaries/runtime/src/operator/python.rs
  6. +1
    -1
      libraries/communication-layer/request-reply/src/tcp.rs

+ 0
- 1
apis/rust/node/src/lib.rs View File

@@ -144,7 +144,6 @@ fn set_up_tracing() -> eyre::Result<()> {
.context("failed to set tracing global subscriber")
}

#[must_use]
pub fn manual_stop_publisher(
communication: &mut dyn CommunicationLayer,
) -> eyre::Result<Box<dyn Publisher>> {


+ 0
- 1
binaries/cli/src/check.rs View File

@@ -3,7 +3,6 @@ use dora_core::{
adjust_shared_library_path,
config::{InputMapping, UserInputMapping},
descriptor::{self, source_is_url, CoreNodeKind, OperatorSource},
topics::ControlRequest,
};
use eyre::{bail, eyre, Context};
use std::{env::consts::EXE_EXTENSION, io::Write, path::Path};


+ 2
- 2
binaries/cli/src/template/cxx/mod.rs View File

@@ -64,7 +64,7 @@ fn create_operator(name: String, path: Option<PathBuf>) -> Result<(), eyre::ErrR

// create directories
let root = path.as_deref().unwrap_or_else(|| Path::new(&name));
fs::create_dir(&root)
fs::create_dir(root)
.with_context(|| format!("failed to create directory `{}`", root.display()))?;

let operator_path = root.join("operator.cc");
@@ -96,7 +96,7 @@ fn create_custom_node(name: String, path: Option<PathBuf>) -> Result<(), eyre::E

// create directories
let root = path.as_deref().unwrap_or_else(|| Path::new(&name));
fs::create_dir(&root)
fs::create_dir(root)
.with_context(|| format!("failed to create directory `{}`", root.display()))?;

let node_path = root.join("node.cc");


+ 0
- 2
binaries/runtime/src/main.rs View File

@@ -1,5 +1,3 @@
use dora_runtime;

fn main() -> Result<(), eyre::Report> {
dora_runtime::main()
}

+ 1
- 1
binaries/runtime/src/operator/python.rs View File

@@ -50,7 +50,7 @@ pub fn spawn(
let path = if source_is_url(source) {
let target_path = Path::new("build")
.join(node_id.to_string())
.join(format!("{}.py", operator_id.to_string()));
.join(format!("{}.py", operator_id));
// try to download the shared library
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()


+ 1
- 1
libraries/communication-layer/request-reply/src/tcp.rs View File

@@ -125,7 +125,7 @@ impl TcpConnection {
fn send(&mut self, request: &[u8]) -> std::io::Result<()> {
let len_raw = (request.len() as u64).to_le_bytes();
self.stream.write_all(&len_raw)?;
self.stream.write_all(&request)?;
self.stream.write_all(request)?;
Ok(())
}



Loading…
Cancel
Save