Skip to content

Commit

Permalink
Addressing clippy failures #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-huba committed Aug 14, 2023
1 parent f4843f8 commit 79dea11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trusted/example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl CounterActor {
}
}

fn get_context<'a>(&'a mut self) -> &'a mut dyn ActorContext {
fn get_context(&mut self) -> &mut dyn ActorContext {
self.context.as_mut().expect("context").as_mut()
}

Expand All @@ -48,7 +48,7 @@ impl CounterActor {
compare_and_swap_request: &CounterCompareAndSwapRequest,
) -> CounterResponse {
let mut response = CounterResponse {
id: id,
id,
status: CounterStatus::Unspecified.into(),
op: None,
};
Expand Down Expand Up @@ -119,7 +119,7 @@ impl Actor for CounterActor {
..Default::default()
};
let mut status = CounterStatus::Success;
if let None = request.op {
if request.op.is_none() {
status = CounterStatus::InvalidArgumentError;
}
if !self.get_context().is_leader() {
Expand Down

0 comments on commit 79dea11

Please sign in to comment.