diff --git a/lektor_utils/Cargo.toml b/lektor_utils/Cargo.toml index a0c54bbe272107b05e515fa6b1221323a7939009..b938a47ee246d2ff7d1c9c0726c2390077bf5126 100644 --- a/lektor_utils/Cargo.toml +++ b/lektor_utils/Cargo.toml @@ -6,12 +6,6 @@ authors.workspace = true license.workspace = true description = "Utilities in common for all the crates in the workspace" -[[bin]] -test = false -doc = false -name = "open" -path = "src/open/main.rs" - [lib] doctest = false diff --git a/lektor_utils/src/open/main.rs b/lektor_utils/src/open/main.rs deleted file mode 100644 index 0c532be559fa4beb67ef227b34073239ea287054..0000000000000000000000000000000000000000 --- a/lektor_utils/src/open/main.rs +++ /dev/null @@ -1,24 +0,0 @@ -use lektor_utils::open; -use std::env; - -fn main() -> Result<(), Box<dyn std::error::Error>> { - let mut args = env::args(); - let path_or_url = match args.nth(1) { - Some(arg) => arg, - None => return Err("usage: open <path-or-url> [--with|-w program]".into()), - }; - - match args.next() { - Some(arg) if arg == "--with" || arg == "-w" => { - let program = args - .next() - .ok_or("--with must be followed by the program to use for opening")?; - open::with(&path_or_url, program) - } - Some(arg) => return Err(format!("Argument '{arg}' is invalid").into()), - None => open::that(&path_or_url), - }?; - - println!("Opened '{}' successfully.", path_or_url); - Ok(()) -}