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};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Bow {
|
||||
seg1_dot1: DotIndex,
|
||||
seg1: SegIndex,
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ struct Route {
|
|||
width: f64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Head {
|
||||
pub dot: DotIndex,
|
||||
pub segbend: Option<Segbend>,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use crate::{
|
|||
primitive::{Bend, Dot},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Segbend {
|
||||
pub seg: SegIndex,
|
||||
pub dot: DotIndex,
|
||||
|
|
|
|||
Loading…
Reference in New Issue