Skip to content

Commit fd431c7

Browse files
committed
Refactor make_request and mod.rs to improve code clarity and organization
1 parent 944a9cd commit fd431c7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

frontend/common/src/utils/client/make_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ where
165165
E::ResponseBody: Serialize + DeserializeOwned,
166166
{
167167
async fn from_req(
168-
req: leptos::server_fn::request::BrowserMockReq,
168+
_: leptos::server_fn::request::BrowserMockReq,
169169
) -> Result<Self, ServerFnError<ErrorType>> {
170170
unreachable!()
171171
}

frontend/common/src/utils/client/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use std::{
77

88
#[cfg(not(target_arch = "wasm32"))]
99
use matchit::Router;
10+
#[cfg(not(target_arch = "wasm32"))]
1011
use models::prelude::*;
1112
#[cfg(not(target_arch = "wasm32"))]
12-
use serde::{de::DeserializeOwned, Serialize};
13+
use serde::{Serialize, de::DeserializeOwned};
1314

1415
pub use self::{make_request::make_request, stream_request::stream_request};
1516

@@ -33,6 +34,7 @@ pub static API_CALL_REGISTRY: ApiCallRegistryData = OnceLock::new();
3334
/// backend so that it can be used by the frontend. This is used internally and
3435
/// should not be used by any other part of the code.
3536
#[cfg(not(target_arch = "wasm32"))]
37+
#[doc(hidden)]
3638
pub fn register_api_call<E>()
3739
where
3840
E: ApiEndpoint,

0 commit comments

Comments
 (0)