Skip to main content

max / alloy

Raise the floor to 1.88, and take the lints that came with it alloy_tui needs Block::shadow, which is ratatui 0.30.2, which declares 1.88. The workspace resolves ratatui for path-patched crates too, so the old 1.86 floor pinned the whole tree to 0.30.0 and the patched alloy_tui would not build. Eight clippy warnings followed, all of them from manual_is_multiple_of, which is MSRV-gated on 1.87 and so had been invisible rather than absent. Mechanical, and applied here rather than left to drift into an unrelated diff. The patch stanza is temporary: makeover carries the bevel intents and the 256-color palette, alloy_tui the keymap overlay, and neither is on crates.io yet.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-27 01:31 UTC
Signed with PGP, not checked
Commit: 2ec336c68a0d3b24c2f3f11dccbb44331650c7c6
Parent: 7b92637
9 files changed, +144 insertions, -48 deletions
M Cargo.lock +120 -36
@@ -38,8 +38,6 @@
38 38 [[package]]
39 39 name = "alloy_tui"
40 40 version = "2.0.0"
41 - source = "registry+https://github.com/rust-lang/crates.io-index"
42 - checksum = "fbb156a777c35110c1b19aac32d9eb52b0c05048812c8cd74a7f3b51b44b1552"
43 41 dependencies = [
44 42 "makeover",
45 43 "ratatui",
@@ -101,6 +99,15 @@
101 99 source = "registry+https://github.com/rust-lang/crates.io-index"
102 100 checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3"
103 101
102 + [[package]]
103 + name = "approx"
104 + version = "0.5.1"
105 + source = "registry+https://github.com/rust-lang/crates.io-index"
106 + checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
107 + dependencies = [
108 + "num-traits",
109 + ]
110 +
104 111 [[package]]
105 112 name = "atomic"
106 113 version = "0.6.1"
@@ -179,6 +186,12 @@
179 186 source = "registry+https://github.com/rust-lang/crates.io-index"
180 187 checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
181 188
189 + [[package]]
190 + name = "by_address"
191 + version = "1.2.1"
192 + source = "registry+https://github.com/rust-lang/crates.io-index"
193 + checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06"
194 +
182 195 [[package]]
183 196 name = "bytemuck"
184 197 version = "1.25.0"
@@ -309,6 +322,12 @@
309 322 "libc",
310 323 ]
311 324
325 + [[package]]
326 + name = "critical-section"
327 + version = "1.2.0"
328 + source = "registry+https://github.com/rust-lang/crates.io-index"
329 + checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
330 +
312 331 [[package]]
313 332 name = "crossterm"
314 333 version = "0.29.0"
@@ -420,9 +439,6 @@
420 439 version = "0.5.8"
421 440 source = "registry+https://github.com/rust-lang/crates.io-index"
422 441 checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
423 - dependencies = [
424 - "powerfmt",
425 - ]
426 442
427 443 [[package]]
428 444 name = "derive_more"
@@ -528,6 +544,12 @@
528 544 "regex",
529 545 ]
530 546
547 + [[package]]
548 + name = "fast-srgb8"
549 + version = "1.0.0"
550 + source = "registry+https://github.com/rust-lang/crates.io-index"
551 + checksum = "dd2e7510819d6fbf51a5545c8f922716ecfb14df168a3242f7d33e0239efe6a1"
552 +
531 553 [[package]]
532 554 name = "filedescriptor"
533 555 version = "0.8.3"
@@ -642,6 +664,11 @@
642 664 version = "0.17.1"
643 665 source = "registry+https://github.com/rust-lang/crates.io-index"
644 666 checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
667 + dependencies = [
668 + "allocator-api2",
669 + "equivalent",
670 + "foldhash",
671 + ]
645 672
646 673 [[package]]
647 674 name = "hashlink"
@@ -791,6 +818,12 @@
791 818 source = "registry+https://github.com/rust-lang/crates.io-index"
792 819 checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
793 820
821 + [[package]]
822 + name = "libm"
823 + version = "0.2.16"
824 + source = "registry+https://github.com/rust-lang/crates.io-index"
825 + checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
826 +
794 827 [[package]]
795 828 name = "libsqlite3-sys"
796 829 version = "0.37.0"
@@ -840,11 +873,11 @@
840 873
841 874 [[package]]
842 875 name = "lru"
843 - version = "0.16.4"
876 + version = "0.18.1"
844 877 source = "registry+https://github.com/rust-lang/crates.io-index"
845 - checksum = "7f66e8d5d03f609abc3a39e6f08e4164ebf1447a732906d39eb9b99b7919ef39"
878 + checksum = "0b6180140927ee907000b0aa540091f6ea512ead4447c92b8fc35bc72788a5a6"
846 879 dependencies = [
847 - "hashbrown 0.16.1",
880 + "hashbrown 0.17.1",
848 881 ]
849 882
850 883 [[package]]
@@ -859,9 +892,7 @@
859 892
860 893 [[package]]
861 894 name = "makeover"
862 - version = "2.1.0"
863 - source = "registry+https://github.com/rust-lang/crates.io-index"
864 - checksum = "a26aeb770bb59143a83a7bffa1150930064b785abbe6b7e99da59697cb592032"
895 + version = "2.1.1"
865 896 dependencies = [
866 897 "include_dir",
867 898 "serde",
@@ -941,9 +972,9 @@
941 972
942 973 [[package]]
943 974 name = "num-conv"
944 - version = "0.1.0"
975 + version = "0.2.2"
945 976 source = "registry+https://github.com/rust-lang/crates.io-index"
946 - checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
977 + checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
947 978
948 979 [[package]]
949 980 name = "num-derive"
@@ -995,6 +1026,30 @@
995 1026 "num-traits",
996 1027 ]
997 1028
1029 + [[package]]
1030 + name = "palette"
1031 + version = "0.7.6"
1032 + source = "registry+https://github.com/rust-lang/crates.io-index"
1033 + checksum = "4cbf71184cc5ecc2e4e1baccdb21026c20e5fc3dcf63028a086131b3ab00b6e6"
1034 + dependencies = [
1035 + "approx",
1036 + "fast-srgb8",
1037 + "libm",
1038 + "palette_derive",
1039 + ]
1040 +
1041 + [[package]]
1042 + name = "palette_derive"
1043 + version = "0.7.6"
1044 + source = "registry+https://github.com/rust-lang/crates.io-index"
1045 + checksum = "f5030daf005bface118c096f510ffb781fc28f9ab6a32ab224d8631be6851d30"
1046 + dependencies = [
1047 + "by_address",
1048 + "proc-macro2",
1049 + "quote",
1050 + "syn 2.0.118",
1051 + ]
1052 +
998 1053 [[package]]
999 1054 name = "parking_lot"
1000 1055 version = "0.12.5"
@@ -1189,31 +1244,35 @@
1189 1244
1190 1245 [[package]]
1191 1246 name = "ratatui"
1192 - version = "0.30.0"
1247 + version = "0.30.2"
1193 1248 source = "registry+https://github.com/rust-lang/crates.io-index"
1194 - checksum = "d1ce67fb8ba4446454d1c8dbaeda0557ff5e94d39d5e5ed7f10a65eb4c8266bc"
1249 + checksum = "3274ba0a2c5e1bcad2a2005d20f4dc59dad26b2eb0940fb094500dba4099d57d"
1195 1250 dependencies = [
1196 1251 "instability",
1197 1252 "ratatui-core",
1198 1253 "ratatui-crossterm",
1199 1254 "ratatui-macros",
1255 + "ratatui-termina",
1200 1256 "ratatui-termwiz",
1201 1257 "ratatui-widgets",
1258 + "serde",
1202 1259 ]
1203 1260
1204 1261 [[package]]
1205 1262 name = "ratatui-core"
1206 - version = "0.1.0"
1263 + version = "0.1.2"
1207 1264 source = "registry+https://github.com/rust-lang/crates.io-index"
1208 - checksum = "5ef8dea09a92caaf73bff7adb70b76162e5937524058a7e5bff37869cbbec293"
1265 + checksum = "cbb175c433c8e28a809d1f5773a2ae96e68c0ce40db865cbab1020bf33ae479c"
1209 1266 dependencies = [
1210 1267 "bitflags 2.13.0",
1211 1268 "compact_str",
1212 - "hashbrown 0.16.1",
1213 - "indoc",
1269 + "critical-section",
1270 + "hashbrown 0.17.1",
1214 1271 "itertools",
1215 1272 "kasuari",
1216 1273 "lru",
1274 + "palette",
1275 + "serde",
1217 1276 "strum",
1218 1277 "thiserror 2.0.18",
1219 1278 "unicode-segmentation",
@@ -1223,9 +1282,9 @@
1223 1282
1224 1283 [[package]]
1225 1284 name = "ratatui-crossterm"
1226 - version = "0.1.0"
1285 + version = "0.1.2"
1227 1286 source = "registry+https://github.com/rust-lang/crates.io-index"
1228 - checksum = "577c9b9f652b4c121fb25c6a391dd06406d3b092ba68827e6d2f09550edc54b3"
1287 + checksum = "567584a3b0e6a8203c23de40b4861497266725eb5363dbfd18a1edd603cca9f0"
1229 1288 dependencies = [
1230 1289 "cfg-if",
1231 1290 "crossterm",
@@ -1235,19 +1294,30 @@
1235 1294
1236 1295 [[package]]
1237 1296 name = "ratatui-macros"
1238 - version = "0.7.0"
1297 + version = "0.7.2"
1239 1298 source = "registry+https://github.com/rust-lang/crates.io-index"
1240 - checksum = "a7f1342a13e83e4bb9d0b793d0ea762be633f9582048c892ae9041ef39c936f4"
1299 + checksum = "ed7dc68daa7498a43e4d68e0eb078427e10c38fbcfbb1e42d955f1fa2140d814"
1241 1300 dependencies = [
1242 1301 "ratatui-core",
1243 1302 "ratatui-widgets",
1244 1303 ]
1245 1304
1246 1305 [[package]]
1247 - name = "ratatui-termwiz"
1306 + name = "ratatui-termina"
1248 1307 version = "0.1.0"
1249 1308 source = "registry+https://github.com/rust-lang/crates.io-index"
1250 - checksum = "0f76fe0bd0ed4295f0321b1676732e2454024c15a35d01904ddb315afd3d545c"
1309 + checksum = "c0bf912d9e66f057a759d92e386a280ea886b352ab757d6ac4d653c7ed2c43c2"
1310 + dependencies = [
1311 + "instability",
1312 + "ratatui-core",
1313 + "termina",
1314 + ]
1315 +
1316 + [[package]]
1317 + name = "ratatui-termwiz"
1318 + version = "0.1.2"
1319 + source = "registry+https://github.com/rust-lang/crates.io-index"
1320 + checksum = "faf03e0380b7744054d6cb74224fe3adf062a029754933f575ca1e3b4c2ce977"
1251 1321 dependencies = [
1252 1322 "ratatui-core",
1253 1323 "termwiz",
@@ -1255,17 +1325,18 @@
1255 1325
1256 1326 [[package]]
1257 1327 name = "ratatui-widgets"
1258 - version = "0.3.0"
1328 + version = "0.3.2"
1259 1329 source = "registry+https://github.com/rust-lang/crates.io-index"
1260 - checksum = "d7dbfa023cd4e604c2553483820c5fe8aa9d71a42eea5aa77c6e7f35756612db"
1330 + checksum = "66e3d19bcc9130ca376277d93b60767ff121ace3be06f5f95f81dd68956407d1"
1261 1331 dependencies = [
1262 1332 "bitflags 2.13.0",
1263 - "hashbrown 0.16.1",
1333 + "hashbrown 0.17.1",
1264 1334 "indoc",
1265 1335 "instability",
1266 1336 "itertools",
1267 1337 "line-clipping",
1268 1338 "ratatui-core",
1339 + "serde",
1269 1340 "strum",
1270 1341 "time",
1271 1342 "unicode-segmentation",
@@ -1549,18 +1620,18 @@
1549 1620
1550 1621 [[package]]
1551 1622 name = "strum"
1552 - version = "0.27.2"
1623 + version = "0.28.0"
1553 1624 source = "registry+https://github.com/rust-lang/crates.io-index"
1554 - checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf"
1625 + checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd"
1555 1626 dependencies = [
1556 1627 "strum_macros",
1557 1628 ]
1558 1629
1559 1630 [[package]]
1560 1631 name = "strum_macros"
1561 - version = "0.27.2"
1632 + version = "0.28.0"
1562 1633 source = "registry+https://github.com/rust-lang/crates.io-index"
1563 - checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7"
1634 + checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664"
1564 1635 dependencies = [
1565 1636 "heck",
1566 1637 "proc-macro2",
@@ -1610,6 +1681,19 @@
1610 1681 "thiserror 2.0.18",
1611 1682 ]
1612 1683
1684 + [[package]]
1685 + name = "termina"
1686 + version = "0.3.3"
1687 + source = "registry+https://github.com/rust-lang/crates.io-index"
1688 + checksum = "9048a889effe34a5cddee0af7f53285198b16dca3be510858d38dfdb3e62a04e"
1689 + dependencies = [
1690 + "bitflags 2.13.0",
1691 + "parking_lot",
1692 + "rustix",
1693 + "signal-hook",
1694 + "windows-sys",
1695 + ]
1696 +
1613 1697 [[package]]
1614 1698 name = "terminfo"
1615 1699 version = "0.9.0"
@@ -1715,9 +1799,9 @@
1715 1799
1716 1800 [[package]]
1717 1801 name = "time"
1718 - version = "0.3.45"
1802 + version = "0.3.54"
1719 1803 source = "registry+https://github.com/rust-lang/crates.io-index"
1720 - checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd"
1804 + checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244"
1721 1805 dependencies = [
1722 1806 "deranged",
1723 1807 "libc",
@@ -1730,9 +1814,9 @@
1730 1814
1731 1815 [[package]]
1732 1816 name = "time-core"
1733 - version = "0.1.7"
1817 + version = "0.1.9"
1734 1818 source = "registry+https://github.com/rust-lang/crates.io-index"
1735 - checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca"
1819 + checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
1736 1820
1737 1821 [[package]]
1738 1822 name = "toml"
M Cargo.toml +9 -1
@@ -4,7 +4,8 @@
4 4
5 5 [workspace.package]
6 6 edition = "2024"
7 - rust-version = "1.86"
7 + # 1.88 is ratatui 0.30.2's floor, and alloy_tui requires it for `Block::shadow`.
8 + rust-version = "1.88"
8 9 license = "GPL-3.0-or-later"
9 10 repository = "https://makenot.work/git/max/alloy"
10 11 authors = ["Max Johnson <me@maxj.phd>"]
@@ -18,6 +19,13 @@
18 19 codegen-units = 1
19 20 strip = "symbols"
20 21
22 + # TEMPORARY. Both crates carry unpublished work the console consumes: makeover's
23 + # bevel intents and 256-color palette, and alloy_tui's keymap overlay. Remove
24 + # when they publish, and raise the requirements above to those releases.
25 + [patch.crates-io]
26 + makeover = { path = "../Libraries/makeover" }
27 + alloy_tui = { path = "../Libraries/alloy_tui" }
28 +
21 29 [workspace.lints.rust]
22 30 unused = "warn"
23 31 unreachable_pub = "warn"
@@ -904,7 +904,7 @@
904 904
905 905 fn tick(&mut self, log: &mut CommandLog) {
906 906 self.ticks += 1;
907 - let poll_devices = self.ticks % DEVICE_POLL_TICKS == 0;
907 + let poll_devices = self.ticks.is_multiple_of(DEVICE_POLL_TICKS);
908 908 log.quiet(|log| {
909 909 self.refresh_streams(log);
910 910 if poll_devices {
@@ -284,7 +284,11 @@
284 284
285 285 /// The activity light's glyph for a given blink count: lit on even, dim on odd.
286 286 fn blink_glyph(blink: usize) -> char {
287 - if blink % 2 == 0 { LIGHT_ON } else { LIGHT_OFF }
287 + if blink.is_multiple_of(2) {
288 + LIGHT_ON
289 + } else {
290 + LIGHT_OFF
291 + }
288 292 }
289 293
290 294 /// Find the ostree deployment directory beneath a mounted target root.
@@ -944,7 +944,7 @@
944 944 if self.server.is_some() {
945 945 return;
946 946 }
947 - if self.ticks % POLL_TICKS == 0 {
947 + if self.ticks.is_multiple_of(POLL_TICKS) {
948 948 log.quiet(|log| self.refresh(log));
949 949 }
950 950 }
@@ -1835,7 +1835,7 @@
1835 1835
1836 1836 fn tick(&mut self, log: &mut CommandLog) {
1837 1837 self.ticks += 1;
1838 - if self.ticks % POLL_TICKS == 0 {
1838 + if self.ticks.is_multiple_of(POLL_TICKS) {
1839 1839 log.quiet(|log| self.refresh(log));
1840 1840 }
1841 1841 }
@@ -1289,7 +1289,7 @@
1289 1289 /// the ground out from under an edit in progress.
1290 1290 fn tick(&mut self, log: &mut CommandLog) {
1291 1291 self.ticks += 1;
1292 - if self.ticks % SYSTEM_POLL_TICKS != 0 || self.typing() {
1292 + if !self.ticks.is_multiple_of(SYSTEM_POLL_TICKS) || self.typing() {
1293 1293 return;
1294 1294 }
1295 1295 if let Some(form) = self.system.as_mut() {
@@ -1409,10 +1409,10 @@
1409 1409 // folds and a bool flips. docs/CONSOLE.md specs it that way, and
1410 1410 // neither meaning is available on the other kind of row.
1411 1411 KeyCode::Char(' ') if on_form => {
1412 - if let Some(form) = self.form_mut() {
1413 - if !form.toggle_fold() {
1414 - form.toggle_bool(log);
1415 - }
1412 + if let Some(form) = self.form_mut()
1413 + && !form.toggle_fold()
1414 + {
1415 + form.toggle_bool(log);
1416 1416 }
1417 1417 }
1418 1418 _ => {}
@@ -522,7 +522,7 @@
522 522
523 523 fn tick(&mut self, log: &mut CommandLog) {
524 524 self.ticks += 1;
525 - if !self.stale && self.ticks % POLL_TICKS != 0 {
525 + if !self.stale && !self.ticks.is_multiple_of(POLL_TICKS) {
526 526 return;
527 527 }
528 528 self.stale = false;
@@ -1492,7 +1492,7 @@
1492 1492 if self.draft.is_some() {
1493 1493 return;
1494 1494 }
1495 - if self.ticks % POLL_TICKS == 0 {
1495 + if self.ticks.is_multiple_of(POLL_TICKS) {
1496 1496 log.quiet(|log| self.refresh(log));
1497 1497 }
1498 1498 }