Added rustfmt config & ran formatter

This commit is contained in:
Jef Roosens 2022-04-02 21:00:38 +02:00
parent 8664453ef7
commit f77be877db
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
5 changed files with 87 additions and 13 deletions

View file

@ -1,4 +1,5 @@
use crate::STATIC_DIR_NAME;
use std::{collections::HashSet, io::ErrorKind, path::Path};
use axum::{
extract::{BodyStream, Extension},
http::StatusCode,
@ -6,16 +7,16 @@ use axum::{
};
use flate2::read::GzDecoder;
use futures_util::TryStreamExt;
use std::collections::HashSet;
use std::io::ErrorKind;
use std::path::Path;
use tar::Archive;
use tokio_util::io::StreamReader;
use crate::STATIC_DIR_NAME;
pub async fn post_deploy(
Extension(data_dir): Extension<String>,
res: BodyStream,
) -> impl IntoResponse {
) -> impl IntoResponse
{
// This converts a stream into something that implements AsyncRead, which we can then use to
// asynchronously write the file to disk
let mut read =

View file

@ -1,8 +1,8 @@
use axum::routing::post;
use axum::Router;
use axum::{routing::post, Router};
mod deploy;
pub fn router() -> Router {
pub fn router() -> Router
{
Router::new().route("/deploy", post(deploy::post_deploy))
}