Skip to content

Conversation

saghm
Copy link
Contributor

@saghm saghm commented Mar 12, 2020

No description provided.

@saghm saghm requested a review from patrickfreed March 12, 2020 19:49
DecoderError::FromUtf8Error(ref inner) => inner.description(),
DecoderError::IoError(ref inner) =>
{
#[allow(deprecated)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error::description has been deprecated in Rust 1.42, and clippy suggests using to_string(), but unfortunately we aren't able to here since we're returning a reference, and the newly-allocated string returned by to_string() won't live long enough. We probably will want to get rid of our own description implementations before 1.0, but for now, I've just annotated each of these calls to suppress the deprecation warning.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you file a ticket for dropping the description implementations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saghm saghm merged commit 96d854b into mongodb:master Mar 13, 2020
@saghm saghm deleted the fix-clippy branch March 13, 2020 16:15
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

Successfully merging this pull request may close these issues.

2 participants