Open kvark opened 7 years ago
The scope of the issue atm is to make a pass over the HAL w.r.t. guidelines and file the relevant PRs or sub-issues.
We can check off C-CASE.
I submit that C-FEATURE can be checked off. The only feature in the core library crates is winit
which follows the rule. The backend features in the examples also follow the rule (though perhaps should be renamed to use the full package name e.g. gfx-backend-metal
instead of metal
). Either way, those are only examples and probably won't be published as a package on crates.io anyway.
C-CONV and C-GETTER can now be checked off.
I checked off a few lines in the list. Also, I believe C-SEND-SYNC will be covered by #1820
Alright, I think there is a long road towards the guidelines, and we'll refine this in future versions. Removing the milestone.
Copied from https://github.com/brson/rust-api-guidelines
as_
,to_
,into_
conventions ([C-CONV])iter
,iter_mut
,into_iter
([C-ITER])Copy
,Clone
,Eq
,PartialEq
,Ord
,PartialOrd
,Hash
,Debug
,Display
,Default
From
,AsRef
,AsMut
([C-CONV-TRAITS])FromIterator
andExtend
([C-COLLECT])Serialize
,Deserialize
([C-SERDE])Send
andSync
where possible ([C-SEND-SYNC])Hex
,Octal
,Binary
formatting ([C-NUM-FMT])R: Read
andW: Write
by value ([C-RW-VALUE])?
, nottry!
, notunwrap
([C-QUESTION-MARK])Deref
andDerefMut
([C-DEREF])bool
orOption
([C-CUSTOM-TYPE])bitflags
, not enums ([C-BITFLAG])Debug
([C-DEBUG])Debug
representation is never empty ([C-DEBUG-NONEMPTY])