Skip to content

Commit

Permalink
Use Default derive and allow dead_code on currently unused field to m…
Browse files Browse the repository at this point in the history
…ake clippy lint check happy. (#23)

* Use Default derive and allow dead_code on currently unused fields to make clippy lint check happy.
* Remove unused saga_template field.
  • Loading branch information
luqmana authored Jan 19, 2022
1 parent c6ea85c commit bd00d6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 1 addition & 6 deletions src/example_provision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,8 @@ pub struct ExampleParams {
pub instance_name: String,
}

#[derive(Debug)]
#[derive(Debug, Default)]
pub struct ExampleContext;
impl Default for ExampleContext {
fn default() -> ExampleContext {
ExampleContext {}
}
}

type SagaExampleContext = ActionContext<ExampleSagaType>;

Expand Down
4 changes: 1 addition & 3 deletions src/saga_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,9 @@ struct TaskParams<UserType: SagaType> {
*/
#[derive(Debug)]
pub struct SagaExecutor<UserType: SagaType> {
#[allow(dead_code)]
log: slog::Logger,

// TODO This could probably be a reference instead.
saga_template: Arc<SagaTemplate<UserType>>,
saga_metadata: Arc<SagaTemplateMetadata>,

/** Channel for monitoring execution completion */
Expand Down Expand Up @@ -635,7 +634,6 @@ impl<UserType: SagaType> SagaExecutor<UserType> {

Ok(SagaExecutor {
log,
saga_template,
saga_metadata,
finish_tx,
saga_id,
Expand Down

0 comments on commit bd00d6f

Please sign in to comment.