diff options
author | 2025-04-08 22:56:40 +0200 | |
---|---|---|
committer | 2025-04-08 22:56:40 +0200 | |
commit | 294d634601bdd71f056101c64e00d7a5a7fc5ae2 (patch) | |
tree | a9b24201cc1ed44d9a470a03a2a9066bc98cb83f /gitolfs3-server/src/api.rs | |
parent | 4a26f611b697907110459631da4d4a0f049440f9 (diff) | |
download | gitolfs3-294d634601bdd71f056101c64e00d7a5a7fc5ae2.tar.gz gitolfs3-294d634601bdd71f056101c64e00d7a5a7fc5ae2.zip |
Switch to Rust 2024, update dependencies
Diffstat (limited to 'gitolfs3-server/src/api.rs')
-rw-r--r-- | gitolfs3-server/src/api.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gitolfs3-server/src/api.rs b/gitolfs3-server/src/api.rs index d71d188..e1a2983 100644 --- a/gitolfs3-server/src/api.rs +++ b/gitolfs3-server/src/api.rs | |||
@@ -1,15 +1,14 @@ | |||
1 | use std::collections::HashMap; | 1 | use std::collections::HashMap; |
2 | 2 | ||
3 | use axum::{ | 3 | use axum::{ |
4 | async_trait, | 4 | Extension, Json, |
5 | extract::{rejection, FromRequest, FromRequestParts, Request}, | 5 | extract::{FromRequest, FromRequestParts, Request, rejection}, |
6 | http, | 6 | http, |
7 | response::{IntoResponse, Response}, | 7 | response::{IntoResponse, Response}, |
8 | Extension, Json, | ||
9 | }; | 8 | }; |
10 | use chrono::{DateTime, Utc}; | 9 | use chrono::{DateTime, Utc}; |
11 | use gitolfs3_common::{Oid, Operation}; | 10 | use gitolfs3_common::{Oid, Operation}; |
12 | use serde::{de::DeserializeOwned, Deserialize, Serialize}; | 11 | use serde::{Deserialize, Serialize, de::DeserializeOwned}; |
13 | 12 | ||
14 | // ----------------------- Generic facilities ---------------------- | 13 | // ----------------------- Generic facilities ---------------------- |
15 | 14 | ||
@@ -76,7 +75,6 @@ fn has_git_lfs_json_content_type(req: &Request) -> bool { | |||
76 | is_git_lfs_json_mimetype(content_type) | 75 | is_git_lfs_json_mimetype(content_type) |
77 | } | 76 | } |
78 | 77 | ||
79 | #[async_trait] | ||
80 | impl<T, S> FromRequest<S> for GitLfsJson<T> | 78 | impl<T, S> FromRequest<S> for GitLfsJson<T> |
81 | where | 79 | where |
82 | T: DeserializeOwned, | 80 | T: DeserializeOwned, |
@@ -122,7 +120,6 @@ impl IntoResponse for RepositoryNameRejection { | |||
122 | } | 120 | } |
123 | } | 121 | } |
124 | 122 | ||
125 | #[async_trait] | ||
126 | impl<S: Send + Sync> FromRequestParts<S> for RepositoryName { | 123 | impl<S: Send + Sync> FromRequestParts<S> for RepositoryName { |
127 | type Rejection = RepositoryNameRejection; | 124 | type Rejection = RepositoryNameRejection; |
128 | 125 | ||