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

chore(schema): added schema to bytes::Bytes #330

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dzmitry-lahoda
Copy link
Contributor

No description provided.

/// Adds schema to `bytes::Bytes`.
/// Conservatively just uses `[u8]` schema, so that any consumer already handles it.
/// while in Rust code we can be more optimal as needed.
#[cfg(feature = "bytes")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feature should be declared in Cargo.toml as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

it probably already is declared as an implicit one from optional dependency https://github.com/near/borsh-rs/blob/master/borsh/Cargo.toml#L41

@akorchyn
Copy link
Collaborator

Hey, thank you for PR. It looks fine to me, but I would want to request a review from @dj8yfo as he worked way more over it

borsh/src/schema.rs Outdated Show resolved Hide resolved
@dzmitry-lahoda dzmitry-lahoda requested a review from dj8yfo January 22, 2025 18:53
Copy link
Collaborator

@dj8yfo dj8yfo left a comment

Choose a reason for hiding this comment

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

lgtm,
but i forgot to mention to add an entry to https://github.com/near/borsh-rs/blob/master/.github/test.sh#L46 for the new test to be run. i checked gh actions logs and didn't find it

@dzmitry-lahoda
Copy link
Contributor Author

btw there are some tools to test features and feature combinations:

https://github.com/romnn/cargo-feature-combinations

https://github.com/frewsxcv/cargo-all-features

https://github.com/taiki-e/cargo-hack

https://github.com/ggwpez/zepter

as i see they can automated some work rather than doing sh with subset of possible combinations

@dzmitry-lahoda dzmitry-lahoda requested a review from dj8yfo January 27, 2025 22:33
@dzmitry-lahoda
Copy link
Contributor Author

dzmitry-lahoda commented Jan 27, 2025

i checked gh actions logs and didn't find it

As I see bytes were not part of CI before my PR. Will not change that in this PR too.
It is improvement not relevant to this PR. Should be done separately.

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