From 2c106cdd26ac7acf363207034ffa3c12a6e3ca20 Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Thu, 29 Nov 2018 20:26:34 -0800 Subject: [PATCH] Rip is already taken on crates.io --- Cargo.lock | 2 +- Cargo.toml | 10 +++++----- README.md | 2 +- src/bin/client.rs | 14 +++++++------- src/bin/server.rs | 12 ++++++------ src/{rip => ripper}/lib.rs | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) rename src/{rip => ripper}/lib.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index 6618e3d..54543bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,7 +54,7 @@ dependencies = [ ] [[package]] -name = "rip" +name = "ripper" version = "0.1.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 6b4fb81..be17481 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,19 +1,19 @@ [package] -name = "rip" +name = "ripper" version = "0.1.0" authors = ["Kevin Cotugno "] [[bin]] -name = "rip" +name = "ripper" path = "src/bin/client.rs" [[bin]] -name = "rip-server" +name = "ripper-server" path = "src/bin/server.rs" [lib] -name = "rip" -path = "src/rip/lib.rs" +name = "ripper" +path = "src/ripper/lib.rs" [dependencies] clap = "~2.32" diff --git a/README.md b/README.md index 0492628..076affa 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# Rip +# Ripper diff --git a/src/bin/client.rs b/src/bin/client.rs index 1e47422..d9cf81e 100644 --- a/src/bin/client.rs +++ b/src/bin/client.rs @@ -4,11 +4,11 @@ use std::io::Write; use std::net::IpAddr; fn main() { - let port = rip::DEFAULT_PORT.to_string(); - let args = App::new(rip::NAME) - .version(rip::VERSION) - .author(rip::AUTHOR) - .about(rip::ABOUT) + let port = ripper::DEFAULT_PORT.to_string(); + let args = App::new(ripper::NAME) + .version(ripper::VERSION) + .author(ripper::AUTHOR) + .about(ripper::ABOUT) .arg( Arg::with_name("port") .short("p") @@ -42,10 +42,10 @@ fn run(args: &ArgMatches) -> Result { Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()), }; - let dest = match rip::parse_socket_addr(args.value_of("host").unwrap(), port) { + let dest = match ripper::parse_socket_addr(args.value_of("host").unwrap(), port) { Ok(v) => v, Err(err) => return Err(err), }; - rip::run_client(dest) + ripper::run_client(dest) } diff --git a/src/bin/server.rs b/src/bin/server.rs index da6db91..9ded792 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -1,14 +1,14 @@ extern crate clap; use clap::{App, Arg, ArgMatches}; -const NAME: &str = "rip-server"; +const NAME: &str = "ripper-server"; fn main() { - let port = rip::DEFAULT_PORT.to_string(); + let port = ripper::DEFAULT_PORT.to_string(); let args = App::new(NAME) - .version(rip::VERSION) - .author(rip::AUTHOR) - .about(rip::ABOUT) + .version(ripper::VERSION) + .author(ripper::AUTHOR) + .about(ripper::ABOUT) .arg( Arg::with_name("port") .short("p") @@ -32,5 +32,5 @@ fn run(args: &ArgMatches) -> Result<(), String> { Err(_) => return Err("Port must be a valid unsigned 16bit integer".to_string()), }; - rip::run_server(port) + ripper::run_server(port) } diff --git a/src/rip/lib.rs b/src/ripper/lib.rs similarity index 99% rename from src/rip/lib.rs rename to src/ripper/lib.rs index 530af7f..c14f05a 100644 --- a/src/rip/lib.rs +++ b/src/ripper/lib.rs @@ -2,7 +2,7 @@ use std::io; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, UdpSocket}; use std::time::Duration; -pub const NAME: &str = "rip"; +pub const NAME: &str = "ripper"; pub const VERSION: &str = "0.1.0"; pub const ABOUT: &str = "Rip is a simple client/server to retrieving a public IP via UDP."; pub const AUTHOR: &str = "Kevin Cotugno ";