Skip to content

Commit

Permalink
Use += operator
Browse files Browse the repository at this point in the history
Clippy emits:

  warning: manual implementation of an assign operation

As suggested, use += operator.
  • Loading branch information
tcharding committed May 16, 2024
1 parent 5e0df21 commit f9907b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitcoind-tests/tests/setup/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl<'a> Translator<String, DescriptorPublicKey, ()> for StrDescPubKeyTranslator
fn pk(&mut self, pk_str: &String) -> Result<DescriptorPublicKey, ()> {
let avail = !pk_str.ends_with('!');
if avail {
self.0 = self.0 + 1;
self.0 += 1;
if pk_str.starts_with('K') {
Ok(DescriptorPublicKey::Single(SinglePub {
origin: None,
Expand Down Expand Up @@ -212,7 +212,7 @@ impl<'a> Translator<String, DescriptorPublicKey, ()> for StrTranslatorLoose<'a>
fn pk(&mut self, pk_str: &String) -> Result<DescriptorPublicKey, ()> {
let avail = !pk_str.ends_with('!');
if avail {
self.0 = self.0 + 1;
self.0 += 1;
if pk_str.starts_with('K') {
Ok(DescriptorPublicKey::Single(SinglePub {
origin: None,
Expand Down

0 comments on commit f9907b0

Please sign in to comment.