|
1 | 1 | use aligned_vec::{AVec, ConstAlign}; |
2 | 2 | use crossbeam::queue::ArrayQueue; |
3 | 3 | use dora_core::{ |
4 | | - build::{self, BuildInfo, PrevGitSource, TracingBuildLogger}, |
| 4 | + build::{self, BuildInfo, PrevGitSource}, |
5 | 5 | config::{DataId, Input, InputMapping, NodeId, NodeRunConfig}, |
6 | 6 | descriptor::{ |
7 | 7 | CoreNodeKind, DYNAMIC_SOURCE, Descriptor, DescriptorExt, ResolvedNode, RuntimeNode, |
@@ -56,11 +56,10 @@ use std::{ |
56 | 56 | use tokio::{ |
57 | 57 | fs::File, |
58 | 58 | io::{AsyncReadExt, AsyncSeekExt}, |
59 | | - net::TcpStream, |
60 | 59 | sync::{ |
61 | 60 | broadcast, |
62 | 61 | mpsc::{self, UnboundedSender}, |
63 | | - oneshot::{self, Sender}, |
| 62 | + oneshot::{self}, |
64 | 63 | }, |
65 | 64 | }; |
66 | 65 | use tokio_stream::{Stream, StreamExt, wrappers::ReceiverStream}; |
@@ -222,8 +221,7 @@ impl Daemon { |
222 | 221 | let (events_tx, events_rx) = flume::bounded(10); |
223 | 222 | if nodes |
224 | 223 | .iter() |
225 | | - .find(|(_n, resolved_nodes)| resolved_nodes.kind.dynamic()) |
226 | | - .is_some() |
| 224 | + .any(|(_n, resolved_nodes)| resolved_nodes.kind.dynamic()) |
227 | 225 | { |
228 | 226 | // Spawn local listener for dynamic nodes |
229 | 227 | let _listen_port = local_listener::spawn_listener_loop( |
@@ -709,10 +707,6 @@ impl Daemon { |
709 | 707 | uv: bool, |
710 | 708 | write_events_to: Option<PathBuf>, |
711 | 709 | ) -> Result<(), String> { |
712 | | - match dataflow_descriptor.communication.remote { |
713 | | - dora_core::config::RemoteCommunicationConfig::Tcp => {} |
714 | | - } |
715 | | - |
716 | 710 | // Resolve base working dir — for spawn we use the daemon's working dir |
717 | 711 | let base_working_dir = match local_working_dir { |
718 | 712 | Some(working_dir) => { |
@@ -879,7 +873,7 @@ impl Daemon { |
879 | 873 | send_output_to_local_receivers( |
880 | 874 | node_id.clone(), |
881 | 875 | output_id.clone(), |
882 | | - &mut *dataflow, |
| 876 | + &mut dataflow, |
883 | 877 | &metadata, |
884 | 878 | data.map(DataMessage::Vec), |
885 | 879 | &self.state.clock, |
@@ -921,7 +915,7 @@ impl Daemon { |
921 | 915 | if let Some(inputs) = dataflow.mappings.get(&output_id).cloned() { |
922 | 916 | for (receiver_id, input_id) in &inputs { |
923 | 917 | close_input( |
924 | | - &mut *dataflow, |
| 918 | + &mut dataflow, |
925 | 919 | receiver_id, |
926 | 920 | input_id, |
927 | 921 | &self.state.clock, |
@@ -1461,7 +1455,7 @@ impl Daemon { |
1461 | 1455 | } |
1462 | 1456 | Ok(mut dataflow) => { |
1463 | 1457 | Self::subscribe( |
1464 | | - &mut *dataflow, |
| 1458 | + &mut dataflow, |
1465 | 1459 | node_id.clone(), |
1466 | 1460 | event_sender, |
1467 | 1461 | &self.state.clock, |
@@ -1615,7 +1609,7 @@ impl Daemon { |
1615 | 1609 | let data_bytes = send_output_to_local_receivers( |
1616 | 1610 | node_id.clone(), |
1617 | 1611 | output_id.clone(), |
1618 | | - &mut *dataflow, |
| 1612 | + &mut dataflow, |
1619 | 1613 | &metadata, |
1620 | 1614 | data, |
1621 | 1615 | &self.state.clock, |
@@ -1846,7 +1840,7 @@ impl Daemon { |
1846 | 1840 | .cloned() |
1847 | 1841 | .collect(); |
1848 | 1842 | for (receiver_id, input_id) in &local_node_inputs { |
1849 | | - close_input(&mut *dataflow, receiver_id, input_id, &self.state.clock); |
| 1843 | + close_input(&mut dataflow, receiver_id, input_id, &self.state.clock); |
1850 | 1844 | } |
1851 | 1845 |
|
1852 | 1846 | let mut closed = Vec::new(); |
@@ -2027,7 +2021,7 @@ impl Daemon { |
2027 | 2021 |
|
2028 | 2022 | let df = &mut *dataflow; |
2029 | 2023 | df.pending_nodes |
2030 | | - .handle_node_stop_sync(node_id, &mut df.cascading_error_causes) |
| 2024 | + .handle_node_stop(node_id, &mut df.cascading_error_causes) |
2031 | 2025 | }; |
2032 | 2026 | // DashMap guard is dropped — safe to do async I/O. |
2033 | 2027 | if exited_before_subscribe { |
@@ -2573,7 +2567,7 @@ async fn read_last_n_lines(file: &mut File, mut tail: usize) -> io::Result<Vec<u |
2573 | 2567 | file.read_exact(&mut buffer[..read_len]).await?; |
2574 | 2568 | let read_buf = if at_end { |
2575 | 2569 | at_end = false; |
2576 | | - &buffer[..read_len].trim_ascii_end() |
| 2570 | + buffer[..read_len].trim_ascii_end() |
2577 | 2571 | } else { |
2578 | 2572 | &buffer[..read_len] |
2579 | 2573 | }; |
@@ -2986,7 +2980,7 @@ impl RunningDataflow { |
2986 | 2980 | clock: &Arc<HLC>, |
2987 | 2981 | ) -> eyre::Result<()> { |
2988 | 2982 | for interval in self.timers.keys().copied() { |
2989 | | - if self._timer_handles.get(&interval).is_some() { |
| 2983 | + if self._timer_handles.contains_key(&interval) { |
2990 | 2984 | continue; |
2991 | 2985 | } |
2992 | 2986 | let events_tx = events_tx.clone(); |
|
0 commit comments