Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: replace Microsoft.GSL #1855

Merged
merged 14 commits into from
Oct 27, 2023
Merged

Refactor: replace Microsoft.GSL #1855

merged 14 commits into from
Oct 27, 2023

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Oct 25, 2023

Referenced issues

Description of the Change

Benefits

Possible Drawbacks

Usage Examples or Tests

Alternate Designs

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
core/api/service/author/impl/author_api_impl.cpp Outdated Show resolved Hide resolved
core/api/service/mmr/rpc.cpp Outdated Show resolved Hide resolved
core/common/final_action.hpp Outdated Show resolved Hide resolved
core/api/service/state/impl/state_api_impl.cpp Outdated Show resolved Hide resolved
namespace kagome::common {
template <size_t MaxSize>
class SLBuffer;
}

namespace kagome::common {

class BufferView : public gsl::span<const uint8_t> {
class BufferView : public std::span<const uint8_t> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why struct BufferView : span instead of using BufferView = libp2p::BytesIn?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BufferView is comparable and has additional methods

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

span is comparable too (libp2p::BytesIn).

No special methods in BufferView.
toHex and toStringView just call free functions

core/consensus/sassafras/impl/sassafras.cpp Outdated Show resolved Hide resolved
core/crypto/bip39/mnemonic.cpp Outdated Show resolved Hide resolved
core/network/adapters/protobuf_block_response.hpp Outdated Show resolved Hide resolved
core/network/helpers/stream_proxy_base.hpp Outdated Show resolved Hide resolved
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon requested a review from turuslan October 27, 2023 11:00
core/network/helpers/stream_read_buffer.hpp Outdated Show resolved Hide resolved
core/common/buffer_view.hpp Outdated Show resolved Hide resolved
@xDimon xDimon merged commit 6b3b59c into master Oct 27, 2023
13 checks passed
@xDimon xDimon deleted the refactor/replace_gsl branch October 27, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants