Skip to content

Commit ceefca4

Browse files
cbor stream improvements (#200)
Signed-off-by: Alexey-N-Chernyshov <[email protected]>
1 parent 41b9532 commit ceefca4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

core/common/libp2p/cbor_stream.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ namespace fc::common::libp2p {
4343
});
4444
}
4545

46-
void CborStream::consume(gsl::span<uint8_t> input,
47-
const ReadCallbackFunc &cb) {
46+
void CborStream::consume(gsl::span<uint8_t> input, ReadCallbackFunc cb) {
4847
auto consumed = buffering_.consume(input);
4948
if (!consumed) {
5049
return cb(consumed.error());

core/common/libp2p/cbor_stream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace fc::common::libp2p {
5757

5858
private:
5959
void readMore(ReadCallbackFunc cb);
60-
void consume(gsl::span<uint8_t> input, const ReadCallbackFunc &cb);
60+
void consume(gsl::span<uint8_t> input, ReadCallbackFunc cb);
6161

6262
std::shared_ptr<Stream> stream_;
6363
CborBuffering buffering_;

0 commit comments

Comments
 (0)