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

Prevent panic when deserializing malformed Duration #1958

Merged
merged 1 commit into from Jan 23, 2021

Commits on Jan 20, 2021

  1. Prevent panic when deserializing malformed Duration

    std::time::Duration::new can panic. There is no alternative non-panicing constructor.
    Check the panic condition beforehand and return an error instead of panicing.
    
    Fixes serde-rs#1933
    jonasbb committed Jan 20, 2021
    Copy the full SHA
    b276849 View commit details
    Browse the repository at this point in the history