Add rustfmt config.

This commit is contained in:
Tom Alexander 2024-09-29 15:03:07 -04:00
parent 0602f8472b
commit 14b38b7fcd
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 21 additions and 4 deletions

14
rustfmt.toml Normal file
View File

@ -0,0 +1,14 @@
imports_granularity = "Item"
group_imports = "StdExternalCrate"
# In rustfmt 2.0 I will want to adjust these settings.
#
# max_width controls the max length of a line before rustfmt gives up
# but that also scales the length of a bunch of other lines
# automaticaly due to width_heuristics. I want to find a way to enable
# rustfmt to work on longer lines when necessary without making my
# regular code too wide.
#
# max_width = 100
# error_on_line_overflow = true
# width_heuristics = "Off"

View File

@ -1,12 +1,13 @@
use std::path::Path;
use std::path::PathBuf;
use regex::Regex;
use tracing::debug;
use crate::crd_pipeline_run::PipelineRun;
use crate::gitea_client::GiteaClient;
use crate::gitea_client::Tree;
use crate::remote_config::RemoteConfig;
use regex::Regex;
use tracing::debug;
pub(crate) async fn discover_webhook_bridge_config(
gitea: &GiteaClient,

View File

@ -1,4 +1,5 @@
use base64::{engine::general_purpose, Engine as _};
use base64::engine::general_purpose;
use base64::Engine as _;
use serde::Deserialize;
use tracing::debug;

View File

@ -13,7 +13,8 @@ use axum::response::IntoResponse;
use axum::response::Response;
use axum::Json;
use axum::RequestExt;
use base64::{engine::general_purpose, Engine as _};
use base64::engine::general_purpose;
use base64::Engine as _;
use hmac::Hmac;
use hmac::Mac;
use http_body_util::BodyExt;