Comments (2)
It is already derived with impl<K: Internal<V>, V> Copy for EnumMap<K, V> where K::Array: Copy {}
. The reason why the manual implementation is here is that it otherwise would put a bound on K
which isn't necessary (see rust-lang/rust#26925).
from enum-map.
That said, that made me realize that EnumMap
with an option key was not copyable, as it wasn't implemented as an array.
from enum-map.
Related Issues (14)
- Don't explicitly require importing enum_map_derive. HOT 1
- Add a method for converting to an array (not a slice) HOT 1
- Clippy fails for single variant enum with Derive HOT 1
- Add Enum for tuples HOT 1
- Stabilize enum-map HOT 2
- Strange code generated in enum_map_derive? HOT 2
- Expose the `array` field (or add `as_array(&self) -> &K::Array`) HOT 8
- Default values for missing fields during deserialization HOT 2
- Derive Eq, Ord, PartialEq and PartialOrd on EnumMap<K,V> when K and V impl those traits HOT 2
- Missing Ord and PartialOrd impls HOT 2
- enum_map! is unusable as a const initializer, and the array field being private makes manual initialization impossible too HOT 1
- `from_usize` gives a generic, misleading panic message on out-of-bounds HOT 1
- Add EnumMap impl for Option<T: Enum> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enum-map.