Skip to content

Commit a04f3b2

Browse files
committed
chore: run cargo fmt
Generated-by: Gemini-CLI
1 parent 08b1506 commit a04f3b2

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

mapf-bench/src/movingai.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
use anyhow::Result;
2+
use std::collections::HashMap;
13
use std::fs::File;
24
use std::io::{BufRead, BufReader};
35
use std::path::Path;
4-
use anyhow::Result;
5-
use std::collections::HashMap;
66

77
use mapf::negotiation::{Agent, Scenario};
88
use std::collections::BTreeMap;
@@ -44,7 +44,11 @@ impl Map {
4444
}
4545
}
4646

47-
Ok(Map { width, height, grid })
47+
Ok(Map {
48+
width,
49+
height,
50+
grid,
51+
})
4852
}
4953

5054
pub fn to_occupancy_map(&self) -> HashMap<i64, Vec<i64>> {

mapf-viz/examples/grid.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,11 @@ impl App {
10091009

10101010
self.canvas.program.layers.3.searches.clear();
10111011

1012-
for ticket in self.search_memory.iter().take(self.debug_ticket_size as usize) {
1012+
for ticket in self
1013+
.search_memory
1014+
.iter()
1015+
.take(self.debug_ticket_size as usize)
1016+
{
10131017
if let Some(mt) = search
10141018
.memory()
10151019
.0
@@ -1319,9 +1323,9 @@ impl App {
13191323
let mut total_length = 0.0;
13201324
for solution in solution_node.proposals.values() {
13211325
total_length += solution.meta.trajectory.windows(2).fold(0.0, |acc, w| {
1322-
(w[0].position.translation.vector - w[1].position.translation.vector).magnitude() + acc
1326+
(w[0].position.translation.vector - w[1].position.translation.vector).magnitude()
1327+
+ acc
13231328
});
1324-
13251329
}
13261330
println!("Total length: {total_length}");
13271331
assert!(self.canvas.program.layers.3.solutions.is_empty());
@@ -1997,7 +2001,10 @@ impl Application for App {
19972001
.push(iced::Space::with_width(Length::Units(16)))
19982002
.push(
19992003
Column::new()
2000-
.push(Text::new(format!("Debug Paths: {}", &self.debug_ticket_size)))
2004+
.push(Text::new(format!(
2005+
"Debug Paths: {}",
2006+
&self.debug_ticket_size
2007+
)))
20012008
.push(iced::Space::with_height(Length::Units(2)))
20022009
.push(
20032010
Slider::new(

0 commit comments

Comments
 (0)