Skip to content

Commit

Permalink
Merge pull request #6 from noelg-cj/rust-web-server
Browse files Browse the repository at this point in the history
Rust web server: projects and tasks
  • Loading branch information
officiallyaninja authored Nov 6, 2023
2 parents 411c503 + d8c641f commit 3d30c1b
Show file tree
Hide file tree
Showing 6 changed files with 245 additions and 187 deletions.
Binary file modified data.db
Binary file not shown.
146 changes: 0 additions & 146 deletions web_server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion web_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ serde_json = "1.0.68"
tokio = { version = "1.0", features = ["full"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
chrono = "0.4.31"

[profile.release]
opt-level = 'z' # Optimize for size
Expand Down
12 changes: 10 additions & 2 deletions web_server/src/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ impl PairExt for Iter<'_, (&str, Option<&str>)> {
T: FromStr,
<T as FromStr>::Err: std::fmt::Debug,
{
self.next()
match self
.next()
.expect("should exist")
.1
.expect("should be not null")
.parse()
.expect("Should parse")
{
Ok(value) => value,
Err(e) => {
println!("{e:?}");
panic!();
}
}
// .expect("Should parse")
}
}
Loading

0 comments on commit 3d30c1b

Please sign in to comment.