aboutsummaryrefslogtreecommitdiff
path: root/src/generation.rs
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2022-10-24 11:17:48 +0200
committeromagdy7 <omar.professional8777@gmail.com>2022-10-24 11:17:48 +0200
commit9e2258209a35c228387950c6e809778608da2185 (patch)
tree25e88e970076e2aeb87f02bd6d8442bab5ea4277 /src/generation.rs
parent8235b1b37afab63bfd769a973e5847348d625f0a (diff)
downloadgof-rs-9e2258209a35c228387950c6e809778608da2185.tar.xz
gof-rs-9e2258209a35c228387950c6e809778608da2185.zip
Added all necessary data to the binary for shiping a stand-alone binary
Diffstat (limited to 'src/generation.rs')
-rw-r--r--src/generation.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/generation.rs b/src/generation.rs
index 63aa3e3..f58bba9 100644
--- a/src/generation.rs
+++ b/src/generation.rs
@@ -159,13 +159,13 @@ pub fn next_gen(app: &mut App) -> Gen {
nxt_gen
}
-pub fn gen_from_file(path: &PathBuf) -> Gen {
+pub fn gen_from_file(s : &String) -> Gen {
let mut gen = Gen::new();
- let file = File::open(path).expect("File not found");
- let reader = BufReader::new(file);
+ // let file = File::open(path).expect("File not found");
+ // let reader = BufReader::new(file);
- for line in reader.lines() {
- let line = line.unwrap();
+ for line in s.lines() {
+ let line = line;
let mut row: Vec<Cell> = vec![];
for ch in line.chars() {
if ch == '.' {