Fix all warnings
This commit is contained in:
parent
34ff825ff0
commit
721e83006d
11 changed files with 57 additions and 71 deletions
|
|
@ -1,9 +1,5 @@
|
|||
use std::ops::Index;
|
||||
|
||||
use factorio_core::visualize::Visualize;
|
||||
use factorio_graph::{
|
||||
graph::Graph,
|
||||
priority_queue::binary_heap::FastBinaryHeap,
|
||||
priority_queue::bucket_queue::BucketQueue,
|
||||
wheighted_graph::{WheightedGraph, shortest_path::dijkstra, steiner_tree},
|
||||
};
|
||||
use tracing::trace_span;
|
||||
|
|
@ -196,7 +192,7 @@ impl Blueprint {
|
|||
// ];
|
||||
|
||||
if let Some(res) =
|
||||
steiner_tree::takaheshi_matsuyama::<_, FastBinaryHeap<_>>(&graph, &pole_positions)
|
||||
steiner_tree::takaheshi_matsuyama::<_, BucketQueue<_>>(&graph, &pole_positions)
|
||||
{
|
||||
for path in res {
|
||||
let path_iter = path.iter().filter_map(
|
||||
|
|
@ -252,7 +248,7 @@ impl Blueprint {
|
|||
let mut roboportmap = self
|
||||
.entities
|
||||
.iter()
|
||||
.filter_map(|(k, e)| match e.entity {
|
||||
.filter_map(|(_k, e)| match e.entity {
|
||||
EntityType::Roboport => Some(e.position),
|
||||
_ => None,
|
||||
})
|
||||
|
|
@ -380,7 +376,7 @@ impl Blueprint {
|
|||
start_nodes: start_nodes.clone(),
|
||||
};
|
||||
|
||||
let p = dijkstra::<_, FastBinaryHeap<_>, _>(&multistart_graph, None, |p| {
|
||||
let p = dijkstra::<_, BucketQueue<_>, _>(&multistart_graph, None, |p| {
|
||||
if let Some(n) = p {
|
||||
match n.node_type {
|
||||
NodeType::In => false,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,12 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use factorio_core::{misc::PositionMap, prelude::Position};
|
||||
use super::Blueprint;
|
||||
use crate::abstraction::Entity;
|
||||
use factorio_core::prelude::Position;
|
||||
use factorio_graph::{
|
||||
graph::Graph,
|
||||
priority_queue::binary_heap::FastBinaryHeap,
|
||||
set_cover::{greedy_connected_set_cover_priority_queue, greedy_set_cover_priority_queue},
|
||||
graph::Graph, priority_queue::binary_heap::FastBinaryHeap,
|
||||
set_cover::greedy_connected_set_cover_priority_queue,
|
||||
};
|
||||
use tracing::trace_span;
|
||||
|
||||
use crate::abstraction::Entity;
|
||||
|
||||
use super::{Blueprint, EntityType};
|
||||
|
||||
struct RoboportGraph<'a> {
|
||||
roboports: &'a [Position],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue