summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs (renamed from src/hitomezashi.rs)2
-rw-r--r--src/main.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hitomezashi.rs b/src/lib.rs
index 8e2a773..9f8643e 100644
--- a/src/hitomezashi.rs
+++ b/src/lib.rs
@@ -32,7 +32,7 @@ fn print_square(is_opaque: bool) {
);
}
-pub fn hitomezashi(width: usize, height: usize, skew: Option<f64>) {
+pub fn generate(width: usize, height: usize, skew: Option<f64>) {
// skew=0.5 generates the most random-looking patterns
let skew: f64 = skew.unwrap_or(0.5);
diff --git a/src/main.rs b/src/main.rs
index 0aba5f0..c936dc1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -19,7 +19,7 @@
use clap::Parser;
use std::ops::RangeInclusive;
-mod hitomezashi;
+use hitomezashi_rs;
#[derive(Parser)]
#[command(version, about, long_about = None)] // Read from `Cargo.toml`
@@ -43,7 +43,7 @@ struct Cli {
fn main() {
let cli = Cli::parse();
- hitomezashi::hitomezashi(cli.width, cli.height, Some(cli.skew));
+ hitomezashi_rs::generate(cli.width, cli.height, Some(cli.skew));
}
const DIMENSION_RANGE: RangeInclusive<usize> = 1..=std::usize::MAX;