|
@@ -2,12 +2,8 @@ mod opts;
|
|
|
|
|
|
use crate::opts::Options;
|
|
|
use clap::Parser;
|
|
|
-use thyme::{
|
|
|
- file::ThymeFile,
|
|
|
- data::Config,
|
|
|
- draw::Pattern,
|
|
|
-};
|
|
|
use std::fs::File;
|
|
|
+use thyme::{data::Config, draw::Pattern, file::ThymeFile};
|
|
|
|
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
// read the command-line options
|
|
@@ -33,11 +29,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
|
Some(opts.output.unwrap_or_else(|| "output.svg".to_string())),
|
|
|
)?;
|
|
|
|
|
|
- Pattern {
|
|
|
- thyme,
|
|
|
- config,
|
|
|
- }
|
|
|
- .draw(cairo::Context::new(&surf)?)?;
|
|
|
+ Pattern { thyme, config }.draw(cairo::Context::new(&surf)?)?;
|
|
|
|
|
|
surf.finish();
|
|
|
|