Skip to content

Commit 255ebb8

Browse files
committed
fix incorrect description when running --help
1 parent 29a7c83 commit 255ebb8

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "http_status_code_check"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
edition = "2021"
55
authors = ["Ramon Moraes <[email protected]>"]
6-
description = "dead simple binary to check http status code returned from health-check endpoint."
6+
description = "dead simple binary to check http status code(s) returned from health-check endpoint."
77
license = "MIT"
88
documentation = "https://docs.rs/http_status_code_check/latest/http_status_code_check/"
99
homepage = "https://github.com/rmoraes92/http_status_code_check"
@@ -15,7 +15,10 @@ clap = { version = "4.5.27", features = ["derive"] }
1515
reqwest = { version = "0.12.12", features = ["blocking"] }
1616

1717
[target.x86_64-unknown-linux-musl.dependencies]
18-
reqwest = { version = "0.12.12", features = ["blocking", "native-tls-vendored"] }
18+
reqwest = { version = "0.12.12", features = [
19+
"blocking",
20+
"native-tls-vendored",
21+
] }
1922

2023
[dev-dependencies]
2124
httpmock = "0.7.0"

src/main.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use std::process::exit;
22

3-
use reqwest;
43
use clap::Parser;
4+
use reqwest;
55

6-
/// Simple program to greet a person
6+
/// dead simple binary to check http status code(s) returned from health-check
7+
/// endpoint.
78
#[derive(Parser, Debug)]
89
#[command(version, about, long_about = None)]
910
struct Args {
@@ -27,7 +28,7 @@ fn healthcheck(url: String, status_codes: Vec<u16>) -> i32 {
2728
}
2829
return 1;
2930
}
30-
}
31+
};
3132
}
3233

3334
fn main() {
@@ -44,8 +45,7 @@ mod tests {
4445
fn test_200() {
4546
let server = MockServer::start();
4647
server.mock(|when, then| {
47-
when.method(GET)
48-
.path("/health");
48+
when.method(GET).path("/health");
4949
then.status(200)
5050
.header("content-type", "text/html")
5151
.body("");
@@ -57,8 +57,7 @@ mod tests {
5757
fn test_201() {
5858
let server = MockServer::start();
5959
server.mock(|when, then| {
60-
when.method(GET)
61-
.path("/health");
60+
when.method(GET).path("/health");
6261
then.status(201)
6362
.header("content-type", "text/html")
6463
.body("");
@@ -70,8 +69,7 @@ mod tests {
7069
fn test_20x() {
7170
let server = MockServer::start();
7271
server.mock(|when, then| {
73-
when.method(GET)
74-
.path("/health");
72+
when.method(GET).path("/health");
7573
then.status(299)
7674
.header("content-type", "text/html")
7775
.body("");

0 commit comments

Comments
 (0)