Skip to content

Commit 41b41ec

Browse files
committed
split code between lib and bin
1 parent 43b5742 commit 41b41ec

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/colormap.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use crate::map::RegionId;
2-
use crate::Map;
1+
use crate::map::{Map, RegionId};
32

43
#[derive(Clone, Debug, PartialEq, Eq)]
54
pub struct ColorMap {

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pub mod colormap;
2+
pub mod map;

src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
mod colormap;
2-
mod map;
3-
41
use std::fs;
52
use std::io;
63
use std::io::Write;
@@ -10,8 +7,8 @@ use colored::Colorize;
107
use rand::prelude::*;
118
use structopt::StructOpt;
129

13-
use crate::colormap::*;
14-
use crate::map::Map;
10+
use map_4col::colormap::{Color, ColorMap};
11+
use map_4col::map::Map;
1512

1613
/// Simple program to generate maps colored following the 4 color theorem.
1714
#[derive(Debug, StructOpt)]

0 commit comments

Comments
 (0)