Debian Codegraph @

debian/patches/1003_replace_cassowary_kasuari.patch

raw symbols SCIP
1 Descriptionscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/patches/`1003_replace_cassowary_kasuari.patch`#Description.: use crate kasuari (not abandoned cassowary)
2 Authorscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/patches/`1003_replace_cassowary_kasuari.patch`#Author.: Jonas Smedegaard <[email protected]scip-debian . . . identity/`[email protected]`.>
3 Bug-Debianscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/patches/`1003_replace_cassowary_kasuari.patch`#Bug-Debian.: https://bugs.debian.org/1129372scip-debian-bts debian-bts . . 1129372:
4 Last-Updatescip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/patches/`1003_replace_cassowary_kasuari.patch`#Last-Update.: 2026-04-08
5 ---
6 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
7 --- a/helix-tui/Cargo.tomlscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/upstream/`helix-tui/Cargo.toml`:
8 +++ b/helix-tui/Cargo.tomlscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/upstream/`helix-tui/Cargo.toml`:
9 @@ -19,7 +19,7 @@
10 helix-core = { path = "../helix-core" }
11
12 bitflags.workspace = true
13 -cassowary = "0.3"
14 +kasuari = "0.4"
15 arrayvec.workspace = true
16 unicode-segmentation.workspace = true
17 termina = { workspace = true, optional = true }
18 --- a/helix-tui/src/layout.rsscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/upstream/`helix-tui/src/layout.rs`:
19 +++ b/helix-tui/src/layout.rsscip-debian debian hx 25.07.1+20260723+ds+~0.3.3+ds+~0.4.0+20260627+ds-2 hx/upstream/`helix-tui/src/layout.rs`:
20 @@ -3,9 +3,9 @@
21 use std::cell::RefCell;
22 use std::collections::HashMap;
23
24 -use cassowary::strength::{REQUIRED, WEAK};
25 -use cassowary::WeightedRelation::*;
26 -use cassowary::{Constraint as CassowaryConstraint, Expression, Solver, Variable};
27 +use kasuari::Strength;
28 +use kasuari::WeightedRelation::*;
29 +use kasuari::{Constraint as KasuariConstraint, Expression, Solver, Variable};
30
31 use helix_view::graphics::{Margin, Rect};
32
33 @@ -208,75 +208,75 @@
34 vars.insert(e.width, (i, 2));
35 vars.insert(e.height, (i, 3));
36 }
37 - let mut ccs: Vec<CassowaryConstraint> =
38 + let mut ccs: Vec<KasuariConstraint> =
39 Vec::with_capacity(elements.len() * 4 + layout.constraints.len() * 6);
40 for elt in &elements {
41 - ccs.push(elt.width | GE(REQUIRED) | 0f64);
42 - ccs.push(elt.height | GE(REQUIRED) | 0f64);
43 - ccs.push(elt.left() | GE(REQUIRED) | f64::from(dest_area.left()));
44 - ccs.push(elt.top() | GE(REQUIRED) | f64::from(dest_area.top()));
45 - ccs.push(elt.right() | LE(REQUIRED) | f64::from(dest_area.right()));
46 - ccs.push(elt.bottom() | LE(REQUIRED) | f64::from(dest_area.bottom()));
47 + ccs.push(elt.width | GE(Strength::REQUIRED) | 0f64);
48 + ccs.push(elt.height | GE(Strength::REQUIRED) | 0f64);
49 + ccs.push(elt.left() | GE(Strength::REQUIRED) | f64::from(dest_area.left()));
50 + ccs.push(elt.top() | GE(Strength::REQUIRED) | f64::from(dest_area.top()));
51 + ccs.push(elt.right() | LE(Strength::REQUIRED) | f64::from(dest_area.right()));
52 + ccs.push(elt.bottom() | LE(Strength::REQUIRED) | f64::from(dest_area.bottom()));
53 }
54 if let Some(first) = elements.first() {
55 ccs.push(match layout.direction {
56 - Direction::Horizontal => first.left() | EQ(REQUIRED) | f64::from(dest_area.left()),
57 - Direction::Vertical => first.top() | EQ(REQUIRED) | f64::from(dest_area.top()),
58 + Direction::Horizontal => first.left() | EQ(Strength::REQUIRED) | f64::from(dest_area.left()),
59 + Direction::Vertical => first.top() | EQ(Strength::REQUIRED) | f64::from(dest_area.top()),
60 });
61 }
62 if let Some(last) = elements.last() {
63 ccs.push(match layout.direction {
64 - Direction::Horizontal => last.right() | EQ(REQUIRED) | f64::from(dest_area.right()),
65 - Direction::Vertical => last.bottom() | EQ(REQUIRED) | f64::from(dest_area.bottom()),
66 + Direction::Horizontal => last.right() | EQ(Strength::REQUIRED) | f64::from(dest_area.right()),
67 + Direction::Vertical => last.bottom() | EQ(Strength::REQUIRED) | f64::from(dest_area.bottom()),
68 });
69 }
70 match layout.direction {
71 Direction::Horizontal => {
72 for pair in elements.windows(2) {
73 - ccs.push((pair[0].x + pair[0].width) | EQ(REQUIRED) | pair[1].x);
74 + ccs.push((pair[0].x + pair[0].width) | EQ(Strength::REQUIRED) | pair[1].x);
75 }
76 for (i, size) in layout.constraints.iter().enumerate() {
77 - ccs.push(elements[i].y | EQ(REQUIRED) | f64::from(dest_area.y));
78 - ccs.push(elements[i].height | EQ(REQUIRED) | f64::from(dest_area.height));
79 + ccs.push(elements[i].y | EQ(Strength::REQUIRED) | f64::from(dest_area.y));
80 + ccs.push(elements[i].height | EQ(Strength::REQUIRED) | f64::from(dest_area.height));
81 ccs.push(match *size {
82 - Constraint::Length(v) => elements[i].width | EQ(WEAK) | f64::from(v),
83 + Constraint::Length(v) => elements[i].width | EQ(Strength::WEAK) | f64::from(v),
84 Constraint::Percentage(v) => {
85 - elements[i].width | EQ(WEAK) | (f64::from(v * dest_area.width) / 100.0)
86 + elements[i].width | EQ(Strength::WEAK) | (f64::from(v * dest_area.width) / 100.0)
87 }
88 Constraint::Ratio(n, d) => {
89 elements[i].width
90 - | EQ(WEAK)
91 + | EQ(Strength::WEAK)
92 | (f64::from(dest_area.width) * f64::from(n) / f64::from(d))
93 }
94 - Constraint::Min(v) => elements[i].width | GE(WEAK) | f64::from(v),
95 - Constraint::Max(v) => elements[i].width | LE(WEAK) | f64::from(v),
96 + Constraint::Min(v) => elements[i].width | GE(Strength::WEAK) | f64::from(v),
97 + Constraint::Max(v) => elements[i].width | LE(Strength::WEAK) | f64::from(v),
98 });
99 }
100 }
101 Direction::Vertical => {
102 for pair in elements.windows(2) {
103 - ccs.push((pair[0].y + pair[0].height) | EQ(REQUIRED) | pair[1].y);
104 + ccs.push((pair[0].y + pair[0].height) | EQ(Strength::REQUIRED) | pair[1].y);
105 }
106 for (i, size) in layout.constraints.iter().enumerate() {
107 - ccs.push(elements[i].x | EQ(REQUIRED) | f64::from(dest_area.x));
108 - ccs.push(elements[i].width | EQ(REQUIRED) | f64::from(dest_area.width));
109 + ccs.push(elements[i].x | EQ(Strength::REQUIRED) | f64::from(dest_area.x));
110 + ccs.push(elements[i].width | EQ(Strength::REQUIRED) | f64::from(dest_area.width));
111 ccs.push(match *size {
112 - Constraint::Length(v) => elements[i].height | EQ(WEAK) | f64::from(v),
113 + Constraint::Length(v) => elements[i].height | EQ(Strength::WEAK) | f64::from(v),
114 Constraint::Percentage(v) => {
115 - elements[i].height | EQ(WEAK) | (f64::from(v * dest_area.height) / 100.0)
116 + elements[i].height | EQ(Strength::WEAK) | (f64::from(v * dest_area.height) / 100.0)
117 }
118 Constraint::Ratio(n, d) => {
119 elements[i].height
120 - | EQ(WEAK)
121 + | EQ(Strength::WEAK)
122 | (f64::from(dest_area.height) * f64::from(n) / f64::from(d))
123 }
124 - Constraint::Min(v) => elements[i].height | GE(WEAK) | f64::from(v),
125 - Constraint::Max(v) => elements[i].height | LE(WEAK) | f64::from(v),
126 + Constraint::Min(v) => elements[i].height | GE(Strength::WEAK) | f64::from(v),
127 + Constraint::Max(v) => elements[i].height | LE(Strength::WEAK) | f64::from(v),
128 });
129 }
130 }
131 }
132 - solver.add_constraints(&ccs).unwrap();
133 + solver.add_constraints(ccs).unwrap();
134 for &(var, value) in solver.fetch_changes() {
135 let (index, attr) = vars[&var];
136 let value = if value.is_sign_negative() {