mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
cargo fmt
This commit is contained in:
@@ -89,9 +89,12 @@ pub struct AnalysisStatus {
|
||||
|
||||
impl AnalysisStatus {
|
||||
pub fn new(store: &RecordingStore) -> Self {
|
||||
let existing_recordings: Vec<String> = store.manifest.entries.iter()
|
||||
.map(|entry| entry.name.clone())
|
||||
.collect();
|
||||
let existing_recordings: Vec<String> = store
|
||||
.manifest
|
||||
.entries
|
||||
.iter()
|
||||
.map(|entry| entry.name.clone())
|
||||
.collect();
|
||||
AnalysisStatus {
|
||||
queued: Vec::new(),
|
||||
running: None,
|
||||
|
||||
@@ -171,8 +171,18 @@ pub async fn stop_recording(
|
||||
let mut qmdl_store = state.qmdl_store_lock.write().await;
|
||||
match qmdl_store.get_current_entry() {
|
||||
Some((_, entry)) => {
|
||||
state.analysis_sender.send(AnalysisCtrlMessage::RecordingFinished(entry.name.to_string())).await
|
||||
.map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, format!("couldn't send AnalysisCtrlMessage: {}", e)))?;
|
||||
state
|
||||
.analysis_sender
|
||||
.send(AnalysisCtrlMessage::RecordingFinished(
|
||||
entry.name.to_string(),
|
||||
))
|
||||
.await
|
||||
.map_err(|e| {
|
||||
(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
format!("couldn't send AnalysisCtrlMessage: {}", e),
|
||||
)
|
||||
})?;
|
||||
}
|
||||
None => todo!(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user