Skip to content

Commit

Permalink
Fix clippy errors in nats client
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <[email protected]>
  • Loading branch information
Jarema committed Aug 31, 2023
1 parent a9b6534 commit 76e2a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nats/src/jetstream/push_subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl PushSubscription {
self.0.stream, self.0.consumer,
))
.spawn(move || {
for m in sub.iter() {
for m in &sub {
if let Err(e) = handler(m) {
// TODO(dlc) - Capture for last error?
log::error!("Error in callback! {:?}", e);
Expand Down Expand Up @@ -394,7 +394,7 @@ impl PushSubscription {
self.0.consumer, self.0.stream
))
.spawn(move || {
for message in sub.iter() {
for message in &sub {
if let Err(err) = handler(&message) {
log::error!("Error in callback! {:?}", err);
}
Expand Down
2 changes: 1 addition & 1 deletion nats/src/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ impl Subscription {
thread::Builder::new()
.name(format!("nats_subscriber_{}_{}", self.0.sid, self.0.subject))
.spawn(move || {
for m in sub.iter() {
for m in &sub {
if let Err(e) = handler(m) {
// TODO(dlc) - Capture for last error?
log::error!("Error in callback! {:?}", e);
Expand Down

0 comments on commit 76e2a02

Please sign in to comment.