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

Add a protoflow_blocks::System::const_bytes helper #30

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

SamuelSarle
Copy link
Contributor

Reviewing #24 I saw that we're using sys.const_string --> sys.encode_lines --> [block that takes Bytes] as a crutch with sometimes unexpected outcomes due to the newlines.
I propose a sys.const_bytes helper as a nicer alternative to get the correct behaviour of Const::<Bytes>::with_system(sys, Bytes::from(...)).

A generic Mapper<Input: Message, Output: Message + From<Input>> block for automating the infallible conversions seems useful too.

@artob artob self-assigned this Dec 17, 2024
Copy link
Member

@artob artob left a comment

Choose a reason for hiding this comment

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

LGTM.

@artob artob merged commit 9047c77 into master Dec 17, 2024
3 checks passed
@artob artob deleted the samuel/const_bytes-helper branch December 17, 2024 12:06
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.

4 participants