mirror of https://codeberg.org/topola/topola.git
Make `Head`, `Segbend`, `Bow` copyable
Having to move or borrow tem, especially `Head`, makes it really difficult to appease the borrow checker.
This commit is contained in:
parent
1d5b428bf9
commit
9f201d2c3d
|
|
@ -5,6 +5,7 @@ use crate::graph::{
|
||||||
};
|
};
|
||||||
use crate::primitive::{Bend, Dot, Seg};
|
use crate::primitive::{Bend, Dot, Seg};
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Bow {
|
pub struct Bow {
|
||||||
seg1_dot1: DotIndex,
|
seg1_dot1: DotIndex,
|
||||||
seg1: SegIndex,
|
seg1: SegIndex,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ struct Route {
|
||||||
width: f64,
|
width: f64,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Head {
|
pub struct Head {
|
||||||
pub dot: DotIndex,
|
pub dot: DotIndex,
|
||||||
pub segbend: Option<Segbend>,
|
pub segbend: Option<Segbend>,
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ use crate::{
|
||||||
primitive::{Bend, Dot},
|
primitive::{Bend, Dot},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Segbend {
|
pub struct Segbend {
|
||||||
pub seg: SegIndex,
|
pub seg: SegIndex,
|
||||||
pub dot: DotIndex,
|
pub dot: DotIndex,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue