Skip to content

Commit d5ad3f0

Browse files
committed
docs: remove unecessary doc
1 parent a13adf9 commit d5ad3f0

File tree

3 files changed

+23
-55
lines changed

3 files changed

+23
-55
lines changed

post-compute/src/compute/computed_file.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ pub fn read_computed_file(
154154
/// # Example
155155
///
156156
/// ```
157-
/// use tee_worker_post_compute::compute::computed_file::{build_result_digest_in_computed_file, ComputedFile};
157+
/// use tee_worker_post_compute::compute::computed_file::{
158+
/// build_result_digest_in_computed_file,
159+
/// ComputedFile
160+
/// };
158161
///
159162
/// let mut computed_file = ComputedFile {
160163
/// task_id: Some("0x123".to_string()),
@@ -233,7 +236,10 @@ pub fn build_result_digest_in_computed_file(
233236
/// # Example
234237
///
235238
/// ```
236-
/// use tee_worker_post_compute::compute::computed_file::{sign_computed_file, ComputedFile};
239+
/// use tee_worker_post_compute::compute::computed_file::{
240+
/// sign_computed_file,
241+
/// ComputedFile
242+
/// };
237243
///
238244
/// // Assuming environment variables are set:
239245
/// // SIGN_WORKER_ADDRESS=0x1234567890abcdef1234567890abcdef12345678

post-compute/src/compute/dropbox.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ const FILES_UPLOAD_PATH: &str = "/2/files/upload";
2727
/// # Example
2828
///
2929
/// ```rust
30-
/// use tee_worker_post_compute::compute::dropbox::{DROPBOX_CONTENT_BASE_URL, DropboxService, DropboxUploader};
30+
/// use tee_worker_post_compute::compute::dropbox::{
31+
/// DROPBOX_CONTENT_BASE_URL,
32+
/// DropboxService,
33+
/// DropboxUploader,
34+
/// };
3135
///
3236
/// let service = DropboxService;
3337
/// let result = service.upload_file(
@@ -81,10 +85,13 @@ impl DropboxUploader for DropboxService {
8185
/// # Example
8286
///
8387
/// ```rust
84-
/// use tee_worker_post_compute::compute::dropbox::{DROPBOX_CONTENT_BASE_URL, DropboxService, DropboxUploader};
88+
/// use tee_worker_post_compute::compute::dropbox::{
89+
/// DROPBOX_CONTENT_BASE_URL,
90+
/// DropboxService,
91+
/// DropboxUploader,
92+
/// };
8593
///
86-
/// let service = DropboxService;
87-
/// let result = service.upload_file(
94+
/// let result = DropboxService.upload_file(
8895
/// "access-token",
8996
/// "/tmp/file.zip",
9097
/// "/results/file.zip",

post-compute/src/compute/web2_result.rs

Lines changed: 4 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -32,50 +32,6 @@ const DROPBOX_RESULT_STORAGE_PROVIDER: &str = "dropbox";
3232
/// The trait methods represent the main stages of the result processing workflow:
3333
/// validation, compression, and upload. Each method can be used independently or
3434
/// as part of the complete workflow provided by [`Web2ResultInterface::encrypt_and_upload_result`].
35-
///
36-
///
37-
/// # Example Implementation
38-
///
39-
/// ```rust
40-
/// use tee_worker_post_compute::compute::{
41-
/// web2_result::Web2ResultInterface,
42-
/// computed_file::ComputedFile,
43-
/// errors::ReplicateStatusCause,
44-
/// };
45-
///
46-
/// struct MockResultService;
47-
///
48-
/// impl Web2ResultInterface for MockResultService {
49-
/// fn encrypt_and_upload_result(&self, computed_file: &ComputedFile) -> Result<(), ReplicateStatusCause> {
50-
/// // Mock implementation for testing
51-
/// Ok(())
52-
/// }
53-
/// fn check_result_files_name(&self, task_id: &str, iexec_out_path: &str) -> Result<(), ReplicateStatusCause> {
54-
/// // Mock implementation for testing
55-
/// Ok(())
56-
/// }
57-
/// fn zip_iexec_out(&self, iexec_out_path: &str, save_in: &str) -> Result<String, ReplicateStatusCause> {
58-
/// // Mock implementation for testing
59-
/// Ok(String::from("/iexec_out.zip"))
60-
/// }
61-
/// fn eventually_encrypt_result(&self, in_data_file_path: &str) -> Result<String, ReplicateStatusCause> {
62-
/// // Mock implementation for testing
63-
/// Ok(String::from("/iexec_out/result.txt"))
64-
/// }
65-
/// fn upload_result(&self, computed_file: &ComputedFile, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
66-
/// // Mock implementation for testing
67-
/// Ok(String::from("https://ipfs.io/ipfs/Qm..."))
68-
/// }
69-
/// fn upload_to_ipfs_with_iexec_proxy(&self, computed_file: &ComputedFile, base_url: &str, token: &str, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
70-
/// // Mock implementation for testing
71-
/// Ok(String::from("https://ipfs.io/ipfs/Qm..."))
72-
/// }
73-
/// fn upload_to_dropbox(&self, computed_file: &ComputedFile, token: &str, file_to_upload_path: &str) -> Result<String, ReplicateStatusCause> {
74-
/// // Mock implementation for testing
75-
/// Ok(String::from("https://dropbox.com/results/0x123.zip"))
76-
/// }
77-
/// }
78-
/// ```
7935
#[cfg_attr(test, automock)]
8036
pub trait Web2ResultInterface {
8137
fn encrypt_and_upload_result(
@@ -434,12 +390,11 @@ impl Web2ResultInterface for Web2ResultService {
434390
/// # Example
435391
///
436392
/// ```rust
437-
/// use tee_worker_post_compute::compute::{
438-
/// web2_result::{Web2ResultInterface, Web2ResultService},
439-
/// utils::env_utils::{TeeSessionEnvironmentVariable, get_env_var_or_error},
440-
/// };
441393
/// use std::env;
442-
/// use base64::{engine::general_purpose, Engine as _};
394+
/// use tee_worker_post_compute::compute::web2_result::{
395+
/// Web2ResultInterface,
396+
/// Web2ResultService
397+
/// };
443398
///
444399
/// // Set environment variables for encryption
445400
/// unsafe {

0 commit comments

Comments
 (0)