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

Nicer API for pushing single event? #85

Closed
dpc opened this issue Feb 14, 2025 · 2 comments
Closed

Nicer API for pushing single event? #85

dpc opened this issue Feb 14, 2025 · 2 comments

Comments

@dpc
Copy link

dpc commented Feb 14, 2025

To do some custom substition of output on certain events, I need use a for event in events { and then push some events (that I don't want to change), or write my custom stuff to the string directly.

Pushing a single element has a meh API:

renderer
    .push([event].into_iter(), &mut out)
    .expect("Can't fail");

🤷

If push was at least taking IntoIterator, then it would be better. Otherwise another trait method that does the [event].into_iter() would be nice.

@dpc
Copy link
Author

dpc commented Feb 14, 2025

Welp, judging by the panic I'm getting, maybe rendering certain events by myself like this might not work. But I'll figure out something.

@dpc
Copy link
Author

dpc commented Feb 14, 2025

Converting to #86

@dpc dpc closed this as completed Feb 14, 2025
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

No branches or pull requests

1 participant