diff --git a/src/main.rs b/src/main.rs index 0d4716a4..19ffa8c7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,7 @@ mod runtime; mod module; mod storage; mod ui; +mod util; use module::bm::BM; diff --git a/src/util/mod.rs b/src/util/mod.rs new file mode 100644 index 00000000..6bef3251 --- /dev/null +++ b/src/util/mod.rs @@ -0,0 +1,6 @@ +use url::Url; + +pub fn is_url(url: &String) -> bool { + Url::parse(&url[..]).is_ok() +} +