-
Notifications
You must be signed in to change notification settings - Fork 6
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
to_string() overflow #14
Comments
Nice find @aldebaranzbradaradjan! The Line 25 in 34758ab
but write!(fmt, "{:?}", self)
|
Hey ! I had already seen that the debug allowed me to bypass the pb on my side: impl From <BrancaError> for ApiError {
fn from (error: BrancaError) -> ApiError {
ApiError::InternalError( format!("{:?}", error) )
}
} But it was not very clean on this side, so I didn't think to use it to implement |
Fixed in c0e872c. |
Hi, I use actix_web to write an api, when I try to call the to_string() method of an branca::errors::Error my worker get stack overflow.
What I have try :
If I use description it works :
It's an error on my side ? I'm new to rust, still learning.
See my error :
Edit :
If I change the implementation of display error I manage to get it working, I don't know if it's a good way to do that but it's working for me :
I'm not sure of how to do a clean disply error impl but I have see something similar in the chrono crate :
https://github.com/chronotope/chrono/blob/main/src/format/mod.rs (line 358) :
The text was updated successfully, but these errors were encountered: