-
Notifications
You must be signed in to change notification settings - Fork 49
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
printer Error type #21
Labels
FIXED
Issue was fixed or implemented, and will be in the next release.
Comments
@liamwh Ho yes, good one. I am going to fix that. It should not be Good timing, I was going to do the 0.1.8 release. Doing the commit now. |
jeremychone
added a commit
that referenced
this issue
Sep 6, 2024
@liamwh Just pushed it. I am going to do the release today or tomorrow. |
Super fast, awesome stuff, thanks very much 🙏! I dropped another issue here btw that might be good for the next release also? |
jeremychone
added
the
FIXED
Issue was fixed or implemented, and will be in the next release.
label
Sep 6, 2024
jeremychone
added a commit
that referenced
this issue
Sep 6, 2024
@liamwh release made. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm on mobile so please forgive the lack of formatting or examples, however I was getting issues with the error type from
print_chat_stream
beingBox<dyn std::Error
. Due to the fact thatBox
is used, the size of the error can not be known at compile time, meaning that the result ofprint_chat_stream
is no longerSend + Sync
, limiting its usage considerably. For example, I'd like to be able to useanyhow
'sContext
trait on the result ofprint_chat_stream
and propoagate it up the call stack using anyhow's Result type, but I believe that requires the error to be Send + Senc, though as I said I'm on mobile and not 100% certain there.I'm not sure of the best practice solution here but I do know that most libraries use
thiserror
to which resolves this problem.Would you please remove the Box from the error returned from
print_chat_stream
and perhaps anywhere else Box is used for errors?The text was updated successfully, but these errors were encountered: