diff --git a/ui/dr-ui/src/merge_thumbs.rs b/ui/dr-ui/src/merge_thumbs.rs index 9d05d31..6c9d296 100644 --- a/ui/dr-ui/src/merge_thumbs.rs +++ b/ui/dr-ui/src/merge_thumbs.rs @@ -228,7 +228,7 @@ mod tests { // (0,0),(1,0),(0,1),(1,1) → 0, 10, 1, 11: mean 5.5, rounded. assert_eq!(at(0, 0), 6); // The right-hand column is one pixel wide: (4,0) and (4,1). - assert_eq!(at(2, 0), (40 + 41 + 1) / 2); + assert_eq!(at(2, 0), 41, "40 and 41, rounded"); // The bottom-right is a single pixel. assert_eq!(at(2, 1), 42); assert!(out.chunks_exact(3).all(|p| p[2] == 1000)); diff --git a/ui/dr-ui/src/merge_ui.rs b/ui/dr-ui/src/merge_ui.rs index ceba979..8d74c25 100644 --- a/ui/dr-ui/src/merge_ui.rs +++ b/ui/dr-ui/src/merge_ui.rs @@ -97,13 +97,16 @@ impl MergeController { } } +/// The names a library folder holds, by folder. +pub type NamesIn = Box std::collections::HashSet>; + /// What the page needs from the library to start: the account for the /// fetch, where the outbox is, and the names a library folder already /// holds, so the composite is not named over one of them. pub struct Context { pub conn: dr_sync::Connection, pub outbox: std::path::PathBuf, - pub names_in: Box std::collections::HashSet>, + pub names_in: NamesIn, } /// Wire the page. `sources` yields the selection as fetchable library