wayver's git archive


a simple self-hosted git server
git clone https://git.wayver.dev/bile

Commit: 1ba94a06f75f7b886e5917f1496851bc03346d5e (tree)
Parent: 3aec1a1bb245ce255f59532eba2bdfe1d2879510 (tree)
Author: wayverd
Date: 2026 M02 20, Fri 20:25:06 -0500
13 files changed; 27 insertions 31 deletions
remove unneeded result type alias

diff --git a/src/handlers/git.rs b/src/handlers/git.rs
index 1b31eb4..c157da7 100644
--- a/src/handlers/git.rs
+++ b/src/handlers/git.rs
@@ -6,13 +6,9 @@ use axum::{
 
 use crate::{
     BileState,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
-    http::{
-        extractor::RepoName,
-        path::Path,
-        response::{ErrorPage, Result},
-    },
+    http::{extractor::RepoName, path::Path, response::ErrorPage},
 };
 
 #[tracing::instrument(skip_all)]
diff --git a/src/handlers/index.rs b/src/handlers/index.rs
index e4b2ff3..5aa93b0 100644
--- a/src/handlers/index.rs
+++ b/src/handlers/index.rs
@@ -8,9 +8,9 @@ use axum::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
-    http::response::{Html, Result},
+    http::response::Html,
     utils::filters,
 };
 
diff --git a/src/handlers/repo_commit.rs b/src/handlers/repo_commit.rs
index f32701d..1e76c99 100644
--- a/src/handlers/repo_commit.rs
+++ b/src/handlers/repo_commit.rs
@@ -15,12 +15,12 @@ use syntect::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{Commit, RepoName},
         path::Path,
-        response::{ErrorPage, Html, Result},
+        response::{ErrorPage, Html},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_file.rs b/src/handlers/repo_file.rs
index e103430..7e32a6f 100644
--- a/src/handlers/repo_file.rs
+++ b/src/handlers/repo_file.rs
@@ -14,12 +14,12 @@ use syntect::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{ObjectName, Ref, RepoName},
         path::Path,
-        response::{ErrorPage, Html, Redirect, Result},
+        response::{ErrorPage, Html, Redirect},
     },
     utils::{blob_mime, filters},
 };
@@ -168,7 +168,7 @@ fn render(
     spec: &str,
     commit: &git2::Commit<'_>,
     blob: &git2::Blob<'_>,
-) -> crate::error::Result<String> {
+) -> Result<String> {
     let extension = path
         .extension()
         .and_then(std::ffi::OsStr::to_str)
diff --git a/src/handlers/repo_file_raw.rs b/src/handlers/repo_file_raw.rs
index c173e5e..3cdee8b 100644
--- a/src/handlers/repo_file_raw.rs
+++ b/src/handlers/repo_file_raw.rs
@@ -8,12 +8,12 @@ use axum::{
 
 use crate::{
     BileState,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{ObjectName, Ref, RepoName},
         path::Path,
-        response::{ErrorPage, Result},
+        response::ErrorPage,
     },
     utils::blob_mime,
 };
diff --git a/src/handlers/repo_home.rs b/src/handlers/repo_home.rs
index 5ccb446..d917232 100644
--- a/src/handlers/repo_home.rs
+++ b/src/handlers/repo_home.rs
@@ -7,12 +7,12 @@ use axum::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::RepoName,
         path::Path,
-        response::{ErrorPage, Html, Result},
+        response::{ErrorPage, Html},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_log.rs b/src/handlers/repo_log.rs
index b90cbb6..df488ee 100644
--- a/src/handlers/repo_log.rs
+++ b/src/handlers/repo_log.rs
@@ -7,12 +7,12 @@ use axum::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{ObjectName, Ref, RepoName},
         path::Path,
-        response::{ErrorPage, Html, Redirect, Result},
+        response::{ErrorPage, Html, Redirect},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_log_feed.rs b/src/handlers/repo_log_feed.rs
index 86f67bf..c4a21b8 100644
--- a/src/handlers/repo_log_feed.rs
+++ b/src/handlers/repo_log_feed.rs
@@ -6,12 +6,12 @@ use axum::{
 
 use crate::{
     BileState,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{Ref, RepoName},
         path::Path,
-        response::{ErrorPage, Result, Xml},
+        response::{ErrorPage, Xml},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_refs.rs b/src/handlers/repo_refs.rs
index 55f823f..4fd54b5 100644
--- a/src/handlers/repo_refs.rs
+++ b/src/handlers/repo_refs.rs
@@ -7,12 +7,12 @@ use axum::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::{Repository, TagEntry},
     http::{
         extractor::RepoName,
         path::Path,
-        response::{ErrorPage, Html, Redirect, Result},
+        response::{ErrorPage, Html, Redirect},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_refs_feed.rs b/src/handlers/repo_refs_feed.rs
index 3f072a7..192f501 100644
--- a/src/handlers/repo_refs_feed.rs
+++ b/src/handlers/repo_refs_feed.rs
@@ -6,12 +6,12 @@ use axum::{
 
 use crate::{
     BileState,
-    error::Context as _,
+    error::{Context as _, Result},
     git::{Repository, TagEntry},
     http::{
         extractor::RepoName,
         path::Path,
-        response::{ErrorPage, Result, Xml},
+        response::{ErrorPage, Xml},
     },
     utils::filters,
 };
diff --git a/src/handlers/repo_tag.rs b/src/handlers/repo_tag.rs
index ef8643d..719590b 100644
--- a/src/handlers/repo_tag.rs
+++ b/src/handlers/repo_tag.rs
@@ -7,12 +7,12 @@ use axum::{
 use crate::{
     BileState,
     config::Config,
-    error::Context as _,
+    error::{Context as _, Result},
     git::Repository,
     http::{
         extractor::{RepoName, Tag},
         path::Path,
-        response::{ErrorPage, Html, Redirect, Result},
+        response::{ErrorPage, Html, Redirect},
     },
     utils::filters,
 };
diff --git a/src/http/response.rs b/src/http/response.rs
index 9ccc45b..a009dfc 100644
--- a/src/http/response.rs
+++ b/src/http/response.rs
@@ -7,8 +7,6 @@ use axum::{
 
 use crate::{config::Config, http::BileState};
 
-pub(crate) type Result<T = Response, E = crate::error::Error> = std::result::Result<T, E>;
-
 pub(crate) struct Css<T>(pub T);
 
 impl<T: IntoResponse> IntoResponse for Css<T> {
diff --git a/src/lib.rs b/src/lib.rs
index 73f9c46..d3864e4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -244,8 +244,10 @@ use tower_http::{timeout::TimeoutLayer, trace::TraceLayer};
 
 use crate::{
     config::Config,
-    http::BileState,
-    http::response::{Css, Ico, Json, Png, Text},
+    http::{
+        BileState,
+        response::{Css, Ico, Json, Png, Text},
+    },
 };
 
 #[global_allocator]