Skip to content

Commit

Permalink
feat: migrate server to actix-http
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed May 26, 2024
1 parent ebec04d commit 05077ec
Show file tree
Hide file tree
Showing 24 changed files with 393 additions and 275 deletions.
3 changes: 3 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
use_field_init_shorthand = true
193 changes: 149 additions & 44 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ edition = "2021"
[dependencies]
badge = { path = "./libs/badge" }

actix-http = { version = "3", features = ["http2"] }
actix-server = "2"
actix-service = "2"
anyhow = "1"
cadence = "1"
crates-index = { version = "2", default-features = false, features = ["git"] }
derive_more = "0.99"
dotenvy = "0.15"
font-awesome-as-a-crate = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
hyper = { version = "0.14.10", features = ["full"] }
indexmap = { version = "2", features = ["serde"] }
lru_time_cache = "0.11"
maud = "0.26"
Expand Down
4 changes: 1 addition & 3 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use std::env;
use std::fs;
use std::path::Path;
use std::{env, fs, path::Path};

use sha1::{Digest, Sha1};

Expand Down
3 changes: 1 addition & 2 deletions libs/badge/badge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ mod tests {
#[test]
#[ignore]
fn test_to_svg() {
use std::fs::File;
use std::io::Write;
use std::{fs::File, io::Write};
let mut file = File::create("test.svg").unwrap();
let options = BadgeOptions {
subject: "latest".to_owned(),
Expand Down
11 changes: 6 additions & 5 deletions src/engine/fut/crawl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ use anyhow::Error;
use futures_util::{future::BoxFuture, stream::FuturesOrdered, FutureExt as _, StreamExt as _};
use relative_path::RelativePathBuf;

use crate::models::repo::RepoPath;

use crate::engine::{
machines::crawler::{ManifestCrawler, ManifestCrawlerOutput},
Engine,
use crate::{
engine::{
machines::crawler::{ManifestCrawler, ManifestCrawlerOutput},
Engine,
},
models::repo::RepoPath,
};

pub async fn crawl_manifest(
Expand Down
3 changes: 1 addition & 2 deletions src/engine/fut/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod analyze;
mod crawl;

pub use self::analyze::analyze_dependencies;
pub use self::crawl::crawl_manifest;
pub use self::{analyze::analyze_dependencies, crawl::crawl_manifest};
Loading

0 comments on commit 05077ec

Please sign in to comment.