We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
rust-lang/rust#15191 (comment)
To fix this issue and make Rust-Graphics work with Rust nightlies, the Field is redesigned.
Field
Copy
let a = b.foo(...).bar(...);
The old Field:
pub enum Field<'a, T> { Value(T), Borrowed(&'a T), } impl<'a, T> Field<'a, T> { #[inline(always)] pub fn get(&'a self) -> &'a T { match *self { Value(val) => val, } } }
The new Field:
pub enum Field<T> { Value(T), } impl<T: Copy> Field<T> { #[inline(always)] pub fn get(&self) -> T { match *self { Value(val) => val, } } }
The text was updated successfully, but these errors were encountered:
You know, I actually like this one better. Any chances of keeping this by-copy version?
Sorry, something went wrong.
No branches or pull requests
rust-lang/rust#15191 (comment)
To fix this issue and make Rust-Graphics work with Rust nightlies, the
Field
is redesigned.Copy
kindlet a = b.foo(...).bar(...);
is allowed. Will not break future API to change back if the better temporary lifetime RFC is implemented RFC: Better temporary lifetimes (so e.g. .as_slice() works) rust-lang/rfcs#66The old
Field
:The new
Field
:The text was updated successfully, but these errors were encountered: