better imports
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-04-14 11:44:49 +02:00
parent cef6e9f4b1
commit c934d5f42e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
6 changed files with 15 additions and 26 deletions

View file

@ -2,33 +2,13 @@ use actix_files::Files;
use actix_web::{middleware::DefaultHeaders, web, App, HttpServer}; use actix_web::{middleware::DefaultHeaders, web, App, HttpServer};
use std::io::Result; use std::io::Result;
use crate::routes::{agreements, blog, contrib, index, networks, not_found, portfolio};
mod config; mod config;
mod template; mod template;
mod utils;
#[path = "misc/github.rs"] mod misc;
mod github; mod routes;
#[path = "routes/agreements.rs"]
mod agreements;
#[path = "routes/not_found.rs"]
mod not_found;
#[path = "routes/index.rs"]
mod index;
#[path = "routes/networks.rs"]
mod networks;
#[path = "routes/portfolio.rs"]
mod portfolio;
#[path = "routes/contrib.rs"]
mod contrib;
#[path = "routes/blog.rs"]
mod blog;
#[actix_web::main] #[actix_web::main]
async fn main() -> Result<()> { async fn main() -> Result<()> {

View file

@ -3,7 +3,7 @@ use core::panic;
use reqwest::{header::ACCEPT, Error}; use reqwest::{header::ACCEPT, Error};
use serde::Deserialize; use serde::Deserialize;
use crate::utils::get_reqwest_client; use crate::misc::utils::get_reqwest_client;
#[derive(Deserialize)] #[derive(Deserialize)]
struct GithubResponse { struct GithubResponse {

2
src/misc/mod.rs Normal file
View file

@ -0,0 +1,2 @@
pub mod github;
mod utils;

View file

@ -2,7 +2,7 @@ use std::collections::HashMap;
use crate::{ use crate::{
config::Config, config::Config,
github::{fetch_pr, ProjectState}, misc::github::{fetch_pr, ProjectState},
template::Infos, template::Infos,
}; };
use actix_web::{get, web, HttpResponse, Responder}; use actix_web::{get, web, HttpResponse, Responder};

7
src/routes/mod.rs Normal file
View file

@ -0,0 +1,7 @@
pub mod agreements;
pub mod blog;
pub mod contrib;
pub mod index;
pub mod networks;
pub mod not_found;
pub mod portfolio;