From 9e2258209a35c228387950c6e809778608da2185 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 24 Oct 2022 11:17:48 +0200 Subject: Added all necessary data to the binary for shiping a stand-alone binary --- src/generation.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/generation.rs') 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 = vec![]; for ch in line.chars() { if ch == '.' { -- cgit v1.2.3