cleanup: Remove unused imports, formatting

This commit is contained in:
Mikolaj Wielgus 2023-10-19 20:29:31 +00:00
parent 708fbb98f1
commit b52eefb1a3
7 changed files with 13 additions and 14 deletions

View File

@ -1,6 +1,6 @@
use contracts::{debug_ensures, debug_requires};
use enum_dispatch::enum_dispatch;
use geo::{EuclideanDistance, EuclideanLength, Point};
use geo::{EuclideanLength, Point};
use crate::{
graph::{BendIndex, BendWeight, DotIndex, DotWeight, Ends, Index, SegIndex, SegWeight},
@ -148,7 +148,7 @@ impl<'a> Draw<'a> {
#[debug_ensures(ret.is_err() -> self.layout.node_count() == old(self.layout.node_count()))]
pub fn segbend_around_bend(
&mut self,
mut head: Head,
head: Head,
around: BendIndex,
width: f64,
) -> Result<SegbendHead, ()> {

View File

@ -1,7 +1,7 @@
use geo::Line;
use crate::{
draw::{Head, HeadTrait, SegbendHead},
draw::{Head, HeadTrait},
graph::{BendIndex, DotIndex},
layout::Layout,
math::{self, Circle},

View File

@ -1,11 +1,10 @@
use contracts::{debug_ensures, debug_invariant};
use contracts::debug_invariant;
use geo::Point;
use petgraph::stable_graph::StableDiGraph;
use petgraph::visit::EdgeRef;
use petgraph::Direction::Incoming;
use rstar::primitives::GeomWithData;
use rstar::{RTree, RTreeObject};
use spade::Triangulation;
use crate::band::Band;
use crate::bow::Bow;

View File

@ -39,7 +39,7 @@ use sdl2::render::Canvas;
use sdl2::video::Window;
use sdl2::EventPump;
use shape::Shape;
use std::panic;
use std::time::Duration;
use tracer::{Trace, Tracer};
@ -96,7 +96,7 @@ impl<'a> RouterObserver for DebugRouterObserver<'a> {
);
}
fn on_probe(&mut self, tracer: &Tracer, trace: &Trace, edge: MeshEdgeReference) {
fn on_probe(&mut self, tracer: &Tracer, trace: &Trace, _edge: MeshEdgeReference) {
render_times(
self.event_pump,
self.canvas,

View File

@ -1,4 +1,4 @@
use std::mem::{self, swap};
use std::mem::swap;
use enum_dispatch::enum_dispatch;
use petgraph::stable_graph::{NodeIndex, StableDiGraph};
@ -57,7 +57,7 @@ impl<'a, W> GenericPrimitive<'a, W> {
})
.next()
{
let weight = *self.graph.node_weight(index).unwrap();
let _weight = *self.graph.node_weight(index).unwrap();
if let Some(Weight::Bend(..)) = self.graph.node_weight(index) {
return Some(BendIndex::new(index));
@ -103,7 +103,7 @@ impl<'a, W> GenericPrimitive<'a, W> {
})
.next()
{
let weight = *self.graph.node_weight(index).unwrap();
let _weight = *self.graph.node_weight(index).unwrap();
if let Some(Weight::Bend(..)) = self.graph.node_weight(index) {
return Some(BendIndex::new(index));

View File

@ -96,7 +96,7 @@ impl Router {
let mut tracer = self.tracer(&mesh);
let trace = tracer.start(mesh.vertex(from));
let (_cost, path) = astar(
let (_cost, _path) = astar(
&mesh,
mesh.vertex(from),
&mut RouterAstarStrategy::new(tracer, trace, mesh.vertex(to), observer),

View File

@ -5,7 +5,7 @@ use crate::{
draw::{BareHead, Draw, Head, HeadTrait, SegbendHead},
graph::{BendIndex, DotIndex, Ends},
layout::Layout,
mesh::{Mesh, MeshEdgeReference, VertexIndex},
mesh::{Mesh, VertexIndex},
primitive::MakeShape,
rules::Rules,
};
@ -94,8 +94,8 @@ impl<'a> Tracer<'a> {
}
fn wrap(&mut self, head: Head, around: DotIndex, width: f64) -> Result<SegbendHead, ()> {
let around_pos = self.layout.primitive(around).weight().circle.pos;
let around_primitive = self.layout.primitive(around);
let _around_pos = self.layout.primitive(around).weight().circle.pos;
let _around_primitive = self.layout.primitive(around);
'blk: {
if let Some(mut layer) = self.layout.primitive(around).outer() {