Skip to content

Commit 3fd7e89

Browse files
committed
Format and clippy
1 parent fd6b1fa commit 3fd7e89

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

examples/my_workflow.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ impl MyWorkflow for MyWorkflowImpl {
1515

1616
Ok(String::from("success"))
1717
}
18-
async fn interact_with_workflow(&self, ctx: SharedWorkflowContext<'_>) -> Result<(), HandlerError> {
18+
async fn interact_with_workflow(
19+
&self,
20+
ctx: SharedWorkflowContext<'_>,
21+
) -> Result<(), HandlerError> {
1922
// implement interaction logic here
2023
// e.g. resolve a promise that the workflow is waiting on
2124

src/lib.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@
7575
//!
7676
//! ```rust,no_run
7777
//!use restate_sdk::prelude::*;
78-
//!
78+
//!
7979
//! #[restate_sdk::object]
8080
//! pub trait MyVirtualObject {
8181
//! async fn my_handler(name: String) -> Result<String, HandlerError>;
8282
//! #[shared]
8383
//! async fn my_concurrent_handler(name: String) -> Result<String, HandlerError>;
8484
//! }
85-
//!
85+
//!
8686
//! pub struct MyVirtualObjectImpl;
87-
//!
87+
//!
8888
//! impl MyVirtualObject for MyVirtualObjectImpl {
8989
//! async fn my_handler(
9090
//! &self,
@@ -101,7 +101,7 @@
101101
//! Ok(format!("{} {}", greeting, ctx.key()))
102102
//! }
103103
//! }
104-
//!
104+
//!
105105
//! #[tokio::main]
106106
//! async fn main() {
107107
//! tracing_subscriber::fmt::init();
@@ -128,30 +128,30 @@
128128
//!
129129
//! ```rust,no_run
130130
//! use restate_sdk::prelude::*;
131-
//!
131+
//!
132132
//! #[restate_sdk::workflow]
133133
//! pub trait MyWorkflow {
134134
//! async fn run(req: String) -> Result<String, HandlerError>;
135135
//! #[shared]
136136
//! async fn interact_with_workflow() -> Result<(), HandlerError>;
137137
//! }
138-
//!
138+
//!
139139
//! pub struct MyWorkflowImpl;
140-
//!
140+
//!
141141
//! impl MyWorkflow for MyWorkflowImpl {
142142
//! async fn run(&self, ctx: WorkflowContext<'_>, req: String) -> Result<String, HandlerError> {
143143
//! //! implement workflow logic here
144-
//!
144+
//!
145145
//! Ok(String::from("success"))
146146
//! }
147147
//! async fn interact_with_workflow(&self, ctx: SharedWorkflowContext<'_>) -> Result<(), HandlerError> {
148148
//! //! implement interaction logic here
149149
//! //! e.g. resolve a promise that the workflow is waiting on
150-
//!
150+
//!
151151
//! Ok(())
152152
//! }
153153
//! }
154-
//!
154+
//!
155155
//! #[tokio::main]
156156
//! async fn main() {
157157
//! tracing_subscriber::fmt::init();
@@ -217,7 +217,6 @@ pub mod http_server;
217217
pub mod hyper;
218218
pub mod serde;
219219

220-
use ::serde::de::StdError;
221220
/// Entry-point macro to define a Restate [Service](https://docs.restate.dev/concepts/services#services-1).
222221
///
223222
/// ```rust,no_run
@@ -483,7 +482,6 @@ pub use restate_sdk_macros::object;
483482
///
484483
/// For more details, check the [`service` macro](macro@crate::service) documentation.
485484
pub use restate_sdk_macros::workflow;
486-
use crate::errors::TerminalError;
487485

488486
/// Prelude contains all the useful imports you need to get started with Restate.
489487
pub mod prelude {

0 commit comments

Comments
 (0)