chiark / gitweb /
otterlib: Pass opts to preview()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 13:57:57 +0000 (14:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 14 May 2022 15:02:03 +0000 (16:02 +0100)
This is going to want the nwtemplates directory.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/otterlib.rs

index 54167c1074c8732d70dd0c0c0464f469ec03d470..51820650aab2c0a0763cf851d8bdc2ef0e648857 100644 (file)
@@ -67,7 +67,7 @@ pub type ItemForOutput = ItemEnquiryData;
 pub const VIS: ShowUnocculted = ShowUnocculted::new_visible();
 
 #[throws(AE)]
-fn preview(items: Vec<ItemForOutput>) {
+fn preview(opts: &Opts, items: Vec<ItemForOutput>) {
   const BORDER: f64 = 1.;
 
   struct Prep {
@@ -256,7 +256,7 @@ fn main() {
       println!("{}", item);
     }
     OutputKind::Preview => {
-      preview(items)?
+      preview(&opts, items)?
     }
   }
 }