fix 1.77 clippy warning (multiple_bound_locations)

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-02 16:53:19 -05:00 committed by June
parent 6022d20797
commit d5bfef18a4
4 changed files with 10 additions and 10 deletions

View file

@ -9,12 +9,12 @@ use tracing::warn;
/// Sends a request to an appservice /// Sends a request to an appservice
/// ///
/// Only returns None if there is no url specified in the appservice registration file /// Only returns None if there is no url specified in the appservice registration file
pub(crate) async fn send_request<T: OutgoingRequest>( pub(crate) async fn send_request<T>(
registration: Registration, registration: Registration,
request: T, request: T,
) -> Option<Result<T::IncomingResponse>> ) -> Option<Result<T::IncomingResponse>>
where where
T: Debug, T: OutgoingRequest + Debug,
{ {
if let Some(destination) = registration.url { if let Some(destination) = registration.url {
let hs_token = registration.hs_token.as_str(); let hs_token = registration.hs_token.as_str();

View file

@ -115,12 +115,12 @@ impl FedDest {
} }
} }
pub(crate) async fn send_request<T: OutgoingRequest>( pub(crate) async fn send_request<T>(
destination: &ServerName, destination: &ServerName,
request: T, request: T,
) -> Result<T::IncomingResponse> ) -> Result<T::IncomingResponse>
where where
T: Debug, T: OutgoingRequest + Debug,
{ {
if !services().globals.allow_federation() { if !services().globals.allow_federation() {
return Err(Error::bad_config("Federation is disabled.")); return Err(Error::bad_config("Federation is disabled."));

View file

@ -44,13 +44,13 @@ impl Service {
} }
#[tracing::instrument(skip(self, destination, request))] #[tracing::instrument(skip(self, destination, request))]
pub async fn send_request<T: OutgoingRequest>( pub async fn send_request<T>(
&self, &self,
destination: &str, destination: &str,
request: T, request: T,
) -> Result<T::IncomingResponse> ) -> Result<T::IncomingResponse>
where where
T: Debug, T: OutgoingRequest + Debug,
{ {
let destination = destination.replace(services().globals.notification_push_path(), ""); let destination = destination.replace(services().globals.notification_push_path(), "");

View file

@ -713,13 +713,13 @@ impl Service {
} }
#[tracing::instrument(skip(self, destination, request))] #[tracing::instrument(skip(self, destination, request))]
pub async fn send_federation_request<T: OutgoingRequest>( pub async fn send_federation_request<T>(
&self, &self,
destination: &ServerName, destination: &ServerName,
request: T, request: T,
) -> Result<T::IncomingResponse> ) -> Result<T::IncomingResponse>
where where
T: Debug, T: OutgoingRequest + Debug,
{ {
if destination.is_ip_literal() || IPAddress::is_valid(destination.host()) { if destination.is_ip_literal() || IPAddress::is_valid(destination.host()) {
info!( info!(
@ -771,13 +771,13 @@ impl Service {
/// Sends a request to an appservice /// Sends a request to an appservice
/// ///
/// Only returns None if there is no url specified in the appservice registration file /// Only returns None if there is no url specified in the appservice registration file
pub async fn send_appservice_request<T: OutgoingRequest>( pub async fn send_appservice_request<T>(
&self, &self,
registration: Registration, registration: Registration,
request: T, request: T,
) -> Option<Result<T::IncomingResponse>> ) -> Option<Result<T::IncomingResponse>>
where where
T: Debug, T: OutgoingRequest + Debug,
{ {
let permit = self.maximum_requests.acquire().await; let permit = self.maximum_requests.acquire().await;
let response = appservice_server::send_request(registration, request).await; let response = appservice_server::send_request(registration, request).await;