summaryrefslogtreecommitdiffstats
path: root/CLI/rust/src
diff options
context:
space:
mode:
authora14m <[email protected]>2021-04-06 20:36:15 +0200
committera14m <[email protected]>2021-04-06 20:36:57 +0200
commita6df4673a6f7de11231ae08238d25519db68d765 (patch)
tree87fb613574c5502d2c7eff63731e69cec7de3dbc /CLI/rust/src
parenta604a6dbf0779c001d145297eb1fb1a1164882f9 (diff)
Fix URL parsing to only support http (as curl lib)
Diffstat (limited to 'CLI/rust/src')
-rw-r--r--CLI/rust/src/game_of_life/generators/input.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/CLI/rust/src/game_of_life/generators/input.rs b/CLI/rust/src/game_of_life/generators/input.rs
index 9584cee..a1bc234 100644
--- a/CLI/rust/src/game_of_life/generators/input.rs
+++ b/CLI/rust/src/game_of_life/generators/input.rs
@@ -8,14 +8,14 @@ use mocktopus::macros::mockable;
/// Generate a new Universe/Board with a parsed local file or remote URL/file
///
-/// If a URL is provided as an input (starting with http/ftp) the URL/File will be downloaded
+/// If a URL is provided as an input (starting with http(s)) the URL/File will be downloaded
/// and parsed to generate a seeding input for the simulation
/// otherwise, it'll be assumed that it's a path to a local file that will be parsed, and
/// used as the seeding input
#[cfg_attr(test, mockable)]
pub(crate) fn new(opts: Opts) -> Result<Universe, Error> {
let input = opts.input.clone().unwrap();
- match Regex::new("^(ht|f)tp(s)?://*").unwrap().is_match(&input) {
+ match Regex::new("^http(s)?://*").unwrap().is_match(&input) {
true => generate_url_data(opts),
false => generate_file_data(opts),
}