Skip to content

Commit ebd1511

Browse files
committed
better names for important things
1 parent 1b43466 commit ebd1511

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

asyncgit/src/graph/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ pub mod walker;
55

66
pub use walker::GraphWalker;
77

8+
/// The maximum number of colors to use for graph lanes
9+
pub const MAX_LANE_COLORS: usize = 16;
10+
11+
/// The type of connection between nodes in the graph
812
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9-
pub enum ConnType {
13+
pub enum ConnectionType {
1014
Vertical,
1115
VerticalDotted,
1216
Cross,
@@ -21,6 +25,8 @@ pub enum ConnType {
2125
BranchDown,
2226
BranchUp,
2327
BranchUpRight,
28+
BranchUpMergeStart,
29+
BranchUpRightMergeEnd,
2430
}
2531

2632
#[derive(Clone, Debug, Default)]
@@ -42,8 +48,8 @@ pub struct GraphRow {
4248

4349
/// Connections emitted per lane:
4450
/// None = empty space
45-
/// Some((ConnType, `color_index`)) = draw this connector in this color
46-
pub lanes: Vec<Option<(ConnType, usize)>>,
51+
/// Some((ConnectionType, `color_index`)) = draw this connector in this color
52+
pub lanes: Vec<Option<(ConnectionType, usize)>>,
4753

4854
/// Horizontal merge bridge: if this commit merges rightward,
4955
/// (`from_lane`, `to_lane`) — the span to draw ─ ╭ ╮ across

0 commit comments

Comments
 (0)