Skip to content

Commit bddda4d

Browse files
committed
refactor: skip using format! macro
1 parent 75c7d62 commit bddda4d

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

src/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn parse_address(address: &str, resolver: &Resolver) -> Vec<IpAddr> {
9393
.map(|cidr| cidr.iter().map(|c| c.address()).collect())
9494
.ok()
9595
.or_else(|| {
96-
format!("{}:{}", &address, 80)
96+
format!("{}:80", &address)
9797
.to_socket_addrs()
9898
.ok()
9999
.map(|mut iter| vec![iter.next().unwrap().ip()])

src/main.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,17 @@ fn main() {
200200
#[allow(clippy::items_after_statements, clippy::needless_raw_string_hashes)]
201201
fn print_opening(opts: &Opts) {
202202
debug!("Printing opening");
203-
let s = format!(
204-
"{}\n{}\n{}\n{}\n{}",
205-
r#".----. .-. .-. .----..---. .----. .---. .--. .-. .-."#,
206-
r#"| {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| |"#,
207-
r#"| .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ |"#,
208-
r#"`-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-'"#,
209-
r#"The Modern Day Port Scanner."#
210-
);
203+
let s = r#".----. .-. .-. .----..---. .----. .---. .--. .-. .-.
204+
| {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| |
205+
| .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ |
206+
`-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-'
207+
The Modern Day Port Scanner."#;
208+
211209
println!("{}", s.gradient(Color::Green).bold());
212-
let info = format!(
213-
"{}\n{}\n{}\n{}",
214-
r#"________________________________________"#,
215-
r#": http://discord.skerritt.blog :"#,
216-
r#": https://github.com/RustScan/RustScan :"#,
217-
r#" --------------------------------------"#
218-
);
210+
let info = r#"________________________________________
211+
: http://discord.skerritt.blog :
212+
: https://github.com/RustScan/RustScan :
213+
--------------------------------------"#;
219214
println!("{}", info.gradient(Color::Yellow).bold());
220215
funny_opening!();
221216

0 commit comments

Comments
 (0)