Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaMorard committed Oct 23, 2024
1 parent 8da63e2 commit 6840d39
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
5 changes: 1 addition & 4 deletions src/proxy/compute/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,7 @@ pub async fn json_handler(
/// * The `disableEdgeDataCollection` query parameter is present in the URL of the request.
/// * The response is cacheable.
/// * The request is for prefetch (indicated by the `Purpose` or `Sec-Purpose` headers).
fn do_process_payload(
request: &RequestHandle,
response: &mut Parts,
) -> Result<bool, &'static str> {
fn do_process_payload(request: &RequestHandle, response: &mut Parts) -> Result<bool, &'static str> {
// do not process the payload if disableEdgeDataCollection query param is present in the URL
let query = request.get_query().as_str();
if query.contains("disableEdgeDataCollection") {
Expand Down
3 changes: 1 addition & 2 deletions src/proxy/controller/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ pub async fn edgee_client_event(ctx: IncomingContext) -> anyhow::Result<Response

let mut data_collection_events: String = String::new();
if body.len() > 0 {
let data_collection_events_res =
compute::json_handler(&body, request, &mut response).await;
let data_collection_events_res = compute::json_handler(&body, request, &mut response).await;
if data_collection_events_res.is_some() {
data_collection_events = data_collection_events_res.unwrap();
}
Expand Down
5 changes: 1 addition & 4 deletions src/proxy/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@ pub async fn handle_request(
Some(compute_duration),
);

Ok(controller::build_response(
response,
Bytes::from(data),
))
Ok(controller::build_response(response, Bytes::from(data)))
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/tools/edgee_cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ impl EdgeeCookie {
/// # Returns
///
/// * `EdgeeCookie` - The `EdgeeCookie` that was retrieved or newly created.
pub fn get_or_set(
request: &RequestHandle,
response: &mut Parts,
payload: &Payload,
) -> EdgeeCookie {
pub fn get_or_set(request: &RequestHandle, response: &mut Parts, payload: &Payload) -> EdgeeCookie {
let edgee_cookie = get(request, response, payload);
if edgee_cookie.is_none() {
return init_and_set_cookie(request, response, payload);
Expand Down

0 comments on commit 6840d39

Please sign in to comment.