Name the folder lookup the merge page is handed, for clippy
This commit is contained in:
@@ -228,7 +228,7 @@ mod tests {
|
|||||||
// (0,0),(1,0),(0,1),(1,1) → 0, 10, 1, 11: mean 5.5, rounded.
|
// (0,0),(1,0),(0,1),(1,1) → 0, 10, 1, 11: mean 5.5, rounded.
|
||||||
assert_eq!(at(0, 0), 6);
|
assert_eq!(at(0, 0), 6);
|
||||||
// The right-hand column is one pixel wide: (4,0) and (4,1).
|
// 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.
|
// The bottom-right is a single pixel.
|
||||||
assert_eq!(at(2, 1), 42);
|
assert_eq!(at(2, 1), 42);
|
||||||
assert!(out.chunks_exact(3).all(|p| p[2] == 1000));
|
assert!(out.chunks_exact(3).all(|p| p[2] == 1000));
|
||||||
|
|||||||
@@ -97,13 +97,16 @@ impl MergeController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The names a library folder holds, by folder.
|
||||||
|
pub type NamesIn = Box<dyn Fn(&str) -> std::collections::HashSet<String>>;
|
||||||
|
|
||||||
/// What the page needs from the library to start: the account for the
|
/// 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
|
/// fetch, where the outbox is, and the names a library folder already
|
||||||
/// holds, so the composite is not named over one of them.
|
/// holds, so the composite is not named over one of them.
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
pub conn: dr_sync::Connection,
|
pub conn: dr_sync::Connection,
|
||||||
pub outbox: std::path::PathBuf,
|
pub outbox: std::path::PathBuf,
|
||||||
pub names_in: Box<dyn Fn(&str) -> std::collections::HashSet<String>>,
|
pub names_in: NamesIn,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wire the page. `sources` yields the selection as fetchable library
|
/// Wire the page. `sources` yields the selection as fetchable library
|
||||||
|
|||||||
Reference in New Issue
Block a user