aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index a8e5552..01a893e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -25,6 +25,7 @@ use sputnik::request::SputnikParts;
use sputnik::response::SputnikBuilder;
use std::convert::Infallible;
use std::env;
+use std::marker::PhantomData;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
@@ -361,6 +362,7 @@ async fn build_response<C: Controller>(
repo,
path: url_path,
branch: rev,
+ __: PhantomData::default(),
};
if !controller.may_read_path(&ctx, parts) {
@@ -474,13 +476,14 @@ fn action_links<C: Controller>(
out
}
-pub struct Context {
+pub struct Context<'a> {
repo: Repository,
branch: Branch,
path: Utf8PathBuf,
+ __: PhantomData<&'a ()>,
}
-impl Context {
+impl Context<'_> {
fn branch_head(&self) -> Result<Commit, Error> {
self.repo
.revparse_single(&self.branch.rev_str())