fix: formatting changes for output and source file

This commit is contained in:
Daniel Alejandro Gallegos 2024-09-28 17:18:23 -04:00
parent d139cff249
commit ba40b1cbb7
Signed by: taco
SSH key fingerprint: SHA256:LlPRME+vkNz+HJIJp27uDA+PgoqS+M+KnFziTqGRSr8
5 changed files with 667 additions and 1080 deletions

46
Cargo.lock generated
View file

@ -33,9 +33,9 @@ checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
[[package]]
name = "indexmap"
version = "2.1.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
"equivalent",
"hashbrown",
@ -61,18 +61,18 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro2"
version = "1.0.69"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.33"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@ -109,18 +109,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.192"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.192"
version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [
"proc-macro2",
"quote",
@ -129,16 +129,16 @@ dependencies = [
[[package]]
name = "serde_spanned"
version = "0.6.4"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80"
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
"serde",
]
[[package]]
name = "strongbad_email"
version = "0.0.1"
version = "0.0.2"
dependencies = [
"rand",
"serde",
@ -147,9 +147,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.39"
version = "2.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590"
dependencies = [
"proc-macro2",
"quote",
@ -158,9 +158,9 @@ dependencies = [
[[package]]
name = "toml"
version = "0.8.8"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned",
@ -170,18 +170,18 @@ dependencies = [
[[package]]
name = "toml_datetime"
version = "0.6.5"
version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.21.0"
version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [
"indexmap",
"serde",
@ -204,9 +204,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "winnow"
version = "0.5.19"
version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
dependencies = [
"memchr",
]

View file

@ -1,11 +1,11 @@
[package]
name = "strongbad_email"
version = "0.0.1"
version = "0.0.2"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.8.5"
serde = { version = "1.0.192", features = ["derive"] }
toml = "0.8.8"
serde = { version = "1.0.210", features = ["derive"] }
toml = "0.8.19"

View file

@ -1,4 +1,4 @@
# strongbad_email
# strongbad_email 🦀
> strong bad underscore email dot exe.
>
@ -6,7 +6,16 @@
>
> _- Strong Bad, [sbemail #68: caper](https://www.youtube.com/watch?v=HBUP2jAPExU)_
A CLI app that prints a random [Strong Bad Email](https://homestarrunner.com/sbemails), written in Rust.
A Rust based CLI app that prints a random [Strong Bad Email](https://homestarrunner.com/sbemails), written in blazingly fast powerful Rust. 🦀
## Features
* Written in **Rust**
* Blazingly fast
* Uses the finest Rust libraries to decode the TOML file containing the sbemails
* Runs on your 386*
(*not sure if it actually runs on a 386, probably not)
## Install
@ -23,7 +32,7 @@ strongbad_email
```
and you should be good to go.
## License
## License
All of the text from the Strong Bad Emails are from the [Homestar Runner Wiki](http://www.hrwiki.org).

View file

@ -21,9 +21,6 @@ fn main() {
toml::from_str(the_paper).expect("failed to deserialize sbemails.toml");
let mut random_number = thread_rng();
let sbemail = sbemails.emails.choose(&mut random_number).unwrap();
println!("sbemail #{}: {}", sbemail.number, sbemail.title);
let sbemail_content = sbemail.content.split("\n");
for part in sbemail_content {
println!("{}", part);
}
println!("sbemail #{}: {} \n", sbemail.number, sbemail.title);
println!("{}", sbemail.content);
}

File diff suppressed because it is too large Load diff