Replace deprecated compare_and_swap with compare_exchange (#514)

The `compare_and_swap` method on atomics is now deprecated in favor
of `compare_exchange`.

Since the author of #510 closed that PR, this is just #510 with rustfmt run.

I also removed an unnecessary trailing semicolon that the latest rust
compiler now complains about.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>

Co-authored-by: Kornel <kornel@cloudflare.com>
This commit is contained in:
Eliza Weisman
2021-02-05 09:27:27 -08:00
committed by GitHub
parent eec547d0dd
commit 2c8c847cd5
2 changed files with 31 additions and 16 deletions

View File

@@ -1371,7 +1371,7 @@ impl proto::Peer for Peer {
reason: Reason::PROTOCOL_ERROR,
});
}}
};
}
b = b.version(Version::HTTP_2);