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

Recognize Option<&str> as a special case and assume it should be borrowed #1029

Closed
dtolnay opened this issue Aug 31, 2017 · 1 comment
Closed
Assignees

Comments

@dtolnay
Copy link
Member

dtolnay commented Aug 31, 2017

As described in https://serde.rs/borrow.html, we recognize &str and &[u8] as special cases but every other borrowed type needs #[serde(borrow)]. Option<&str> is common enough and obvious enough that we should handle it too.

@dtolnay dtolnay self-assigned this May 7, 2018
@dtolnay
Copy link
Member Author

dtolnay commented May 8, 2018

Fixed in b2b36e1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant