Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

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

Merged
artob merged 1 commit intomasterfrom
samuel/const_bytes-helper
Dec 17, 2024
Merged

Add a protoflow_blocks::System::const_bytes helper#30
artob merged 1 commit intomasterfrom
samuel/const_bytes-helper

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
Owner

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants