fix: thanks clippy

This commit is contained in:
əlemi 2023-10-19 05:45:37 +02:00
parent 6b4318f1cf
commit 451b2c18ad
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 2 additions and 2 deletions

View file

@ -108,7 +108,7 @@ impl BubbleChart {
if let Some(Some(local_bubble)) = local_bubble {
vertex.mass += 0.1 * local_bubble.len() as f32;
vertex.value += 1 * local_bubble.len();
vertex.value += local_bubble.len();
for instance in local_bubble {
if let Some(other_domain) = instance.as_str() {
if let Ok(mut other_vertex) = self.get_vertex(other_domain).await {

View file

@ -34,7 +34,7 @@ async fn route_crawl_domain(
tracing::info!("starting new crawl from {}", params.domain);
let mut chart = BubbleChart::new(db.clone());
match chart.chart_local_bubble(&params.domain).await {
Ok(()) => Json((chart.vertices.values().into_iter().cloned().collect(), chart.arcs)),
Ok(()) => Json((chart.vertices.values().cloned().collect(), chart.arcs)),
Err(e) => {
tracing::error!("could not chart requested domain: {}", e);
Json((Vec::new(), Vec::new()))