Skip to content

Commit 909f2ae

Browse files
committed
docs: improve documentation formatting and clarity
1 parent 4bd2535 commit 909f2ae

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

post-compute/src/api/result_proxy_api_client.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ impl ResultProxyApiClient {
110110
/// # Example
111111
///
112112
/// ```rust
113-
/// use tee_worker_post_compute::api::result_proxy_api_client::{ResultProxyApiClient, ResultModel};
113+
/// use tee_worker_post_compute::api::result_proxy_api_client::{
114+
/// ResultProxyApiClient,
115+
/// ResultModel,
116+
/// };
114117
///
115118
/// let client = ResultProxyApiClient::new("https://result-proxy.iex.ec");
116119
/// let result_model = ResultModel {

post-compute/src/api/worker_api.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ use serde::Serialize;
2424
/// # Example
2525
///
2626
/// ```
27-
/// use tee_worker_post_compute::api::worker_api::ExitMessage;
28-
/// use tee_worker_post_compute::compute::errors::ReplicateStatusCause;
27+
/// use tee_worker_post_compute::{
28+
/// api::worker_api::ExitMessage,
29+
/// compute::errors::ReplicateStatusCause,
30+
/// };
2931
///
3032
/// let exit_message = ExitMessage::from(&ReplicateStatusCause::PostComputeInvalidTeeSignature);
3133
/// ```
@@ -112,14 +114,16 @@ impl WorkerApiClient {
112114
///
113115
/// # Errors
114116
///
115-
/// This function will return an [`crate::compute::errors::ReplicateStatusCause`] if the request could not be sent or
116-
/// the server responded with a non‑success status.
117+
/// This function will return an [`tee_worker_post_compute::compute::errors::ReplicateStatusCause`]
118+
/// if the request could not be sent or the server responded with a non‑success status.
117119
///
118120
/// # Example
119121
///
120122
/// ```
121-
/// use tee_worker_post_compute::api::worker_api::{ExitMessage, WorkerApiClient};
122-
/// use tee_worker_post_compute::compute::errors::ReplicateStatusCause;
123+
/// use tee_worker_post_compute::{
124+
/// api::worker_api::{ExitMessage, WorkerApiClient},
125+
/// compute::errors::ReplicateStatusCause,
126+
/// };
123127
///
124128
/// let client = WorkerApiClient::new("http://worker:13100");
125129
/// let exit_message = ExitMessage::from(&ReplicateStatusCause::PostComputeInvalidTeeSignature);
@@ -186,8 +190,10 @@ impl WorkerApiClient {
186190
/// # Example
187191
///
188192
/// ```
189-
/// use tee_worker_post_compute::api::worker_api::WorkerApiClient;
190-
/// use tee_worker_post_compute::compute::computed_file::ComputedFile;
193+
/// use tee_worker_post_compute::{
194+
/// api::worker_api::WorkerApiClient,
195+
/// compute::computed_file::ComputedFile,
196+
/// };
191197
///
192198
/// let client = WorkerApiClient::new("http://worker:13100");
193199
/// let computed_file = ComputedFile {

post-compute/src/compute/app_runner.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ impl PostComputeRunnerInterface for DefaultPostComputeRunner {
153153
/// use tee_worker_post_compute::compute::app_runner::{
154154
/// start_with_runner,
155155
/// DefaultPostComputeRunner,
156-
/// PostComputeRunnerInterface,
157156
/// };
158157
///
159158
/// // Using the default runner

post-compute/src/compute/dropbox.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const FILES_UPLOAD_PATH: &str = "/2/files/upload";
2121

2222
/// Service for handling Dropbox file uploads.
2323
///
24-
/// This is a lightweight utility type. Construct with `let service = DropboxService;` and call
24+
/// This is a lightweight utility type. Use with `DropboxService` and call
2525
/// [`DropboxService::upload_file`].
2626
///
2727
/// # Example
@@ -33,8 +33,7 @@ const FILES_UPLOAD_PATH: &str = "/2/files/upload";
3333
/// DropboxUploader,
3434
/// };
3535
///
36-
/// let service = DropboxService;
37-
/// let result = service.upload_file(
36+
/// let result = DropboxService.upload_file(
3837
/// "your-access-token",
3938
/// "/path/to/local/file.zip",
4039
/// "/results/remote-file.zip",

post-compute/src/compute/web2_result.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ pub trait Web2ResultInterface {
8686
/// computed_file::ComputedFile,
8787
/// };
8888
///
89-
/// let service = Web2ResultService;
9089
/// let computed_file = ComputedFile {
9190
/// task_id: Some(String::from("0x123")),
9291
/// result_digest: Some(String::from("0xabc")),
@@ -95,7 +94,7 @@ pub trait Web2ResultInterface {
9594
/// };
9695
///
9796
/// // Process and upload results
98-
/// match service.encrypt_and_upload_result(&computed_file) {
97+
/// match Web2ResultService.encrypt_and_upload_result(&computed_file) {
9998
/// Ok(()) => println!("Results uploaded successfully"),
10099
/// Err(e) => eprintln!("Upload failed: {:?}", e),
101100
/// }

0 commit comments

Comments
 (0)