[rialto] Refactor process_request API return type

To facilitate the separation of the requests module into a
standalone library, thereby enabling unit testing of the
request processing functionality.

Bug: 301068421
Test: atest rialto_test
Change-Id: I0e5b55decf0a431a5dabef34d257212d93d999e4
diff --git a/rialto/src/requests/api.rs b/rialto/src/requests/api.rs
index 59a7aed..ca60f85 100644
--- a/rialto/src/requests/api.rs
+++ b/rialto/src/requests/api.rs
@@ -15,7 +15,6 @@
 //! This module contains the main API for the request processing module.
 
 use super::rkp;
-use crate::error::Result;
 use alloc::vec::Vec;
 use diced_open_dice::DiceArtifacts;
 use service_vm_comm::{Request, Response};
@@ -23,8 +22,8 @@
 /// Processes a request and returns the corresponding response.
 /// This function serves as the entry point for the request processing
 /// module.
-pub fn process_request(request: Request, dice_artifacts: &dyn DiceArtifacts) -> Result<Response> {
-    let response = match request {
+pub fn process_request(request: Request, dice_artifacts: &dyn DiceArtifacts) -> Response {
+    match request {
         Request::Reverse(v) => Response::Reverse(reverse(v)),
         Request::GenerateEcdsaP256KeyPair => rkp::generate_ecdsa_p256_key_pair(dice_artifacts)
             .map_or_else(Response::Err, Response::GenerateEcdsaP256KeyPair),
@@ -32,8 +31,7 @@
             rkp::generate_certificate_request(p, dice_artifacts)
                 .map_or_else(Response::Err, Response::GenerateCertificateRequest)
         }
-    };
-    Ok(response)
+    }
 }
 
 fn reverse(payload: Vec<u8>) -> Vec<u8> {