Skip to content

Commit

Permalink
chore: minor style adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
etolbakov authored Dec 9, 2023
1 parent 870f389 commit 7e2fc6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions quickwit/quickwit-serve/src/jaeger_api/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl JaegerTrace {
/// The logic has been replicated from
/// https://github.com/jaegertracing/jaeger/blob/995231c42cadd70bce2bbbf02579e33f6e6329c8/model/converter/json/process_hashtable.go#L37
fn handle_span_processes(
spans: &mut Vec<JaegerSpan>,
spans: &mut [JaegerSpan],
count: &mut i32,
acc: &mut HashMap<u64, Vec<JaegerProcess>>,
) {
Expand Down Expand Up @@ -126,7 +126,7 @@ impl JaegerTrace {
data: &HashMap<u64, Vec<JaegerProcess>>,
) -> HashMap<String, JaegerProcess> {
let mut result: HashMap<String, JaegerProcess> = HashMap::new();
for (_, processes) in data {
for processes in data.values() {
for process in processes {
result.insert(process.key.clone(), process.clone());
}
Expand Down Expand Up @@ -315,7 +315,6 @@ impl JaegerProcess {
}
}

///
pub fn next_key(count: &i32) -> String {
format!("p{}", count)
}
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-serve/src/jaeger_api/rest_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async fn jaeger_traces_search(

let result: Vec<JaegerTrace> = spans
.iter()
.map(|span| JaegerSpan::find_better_name_for_pb_convert(&span))
.map(JaegerSpan::find_better_name_for_pb_convert)
.group_by(|span| span.trace_id.clone())
.into_iter()
.map(|(span_id, group)| JaegerTrace::new(span_id, group.collect_vec()))
Expand All @@ -227,7 +227,7 @@ async fn jaeger_get_trace_by_id(

let result: Vec<JaegerTrace> = spans
.iter()
.map(|span| JaegerSpan::find_better_name_for_pb_convert(&span))
.map(JaegerSpan::find_better_name_for_pb_convert)
.group_by(|span| span.trace_id.clone())
.into_iter()
.map(|(span_id, group)| JaegerTrace::new(span_id, group.collect_vec()))
Expand Down
1 change: 1 addition & 0 deletions quickwit/quickwit-serve/src/rest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ mod tests {
metastore_server_opt: None,
node_config: Arc::new(node_config.clone()),
search_service: Arc::new(MockSearchService::new()),
jaeger_service_opt: None,
};
let handler = api_v1_routes(Arc::new(quickwit_services));
let resp = warp::test::request()
Expand Down

0 comments on commit 7e2fc6d

Please sign in to comment.