Skip to content

Commit b9dfda4

Browse files
committed
Reorder a few methods
1 parent 1274863 commit b9dfda4

2 files changed

Lines changed: 25 additions & 23 deletions

File tree

src/bits.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ impl<V: BitValue> BitSet<V> {
8686
/// The number of [`Word`]s that make up any given [`BitSet`] can also vary between platforms,
8787
/// and is generally only guaranteed to be large enough to store
8888
/// [`<V as BitValue>::MAX`][BitValue::MAX], but may be arbitrarily larger.
89+
/// Additionally, the number of [`Word`]s may increase in minor and patch releases to make room
90+
/// for newly added enumeration constants.
8991
pub fn words(&self) -> &[Word] {
9092
self.words.as_ref()
9193
}
@@ -96,7 +98,7 @@ impl<V: BitValue> BitSet<V> {
9698
/// [`<V as BitValue>::MAX`][BitValue::MAX]. Doing so might cause the [`BitSet`] to behave
9799
/// incorrectly.
98100
///
99-
/// Note that the [`Word`] type varies in size between platforms.
101+
/// Further, all the same considerations from [`BitSet::words`] apply here as well.
100102
pub fn words_mut(&mut self) -> &mut [Word] {
101103
self.words.as_mut()
102104
}

src/ff.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -405,16 +405,6 @@ impl Effect<'_> {
405405
this
406406
}
407407

408-
#[inline]
409-
pub fn effect_type(&self) -> EffectType {
410-
EffectType(self.raw.type_)
411-
}
412-
413-
#[inline]
414-
pub fn id(&self) -> EffectId {
415-
EffectId(self.raw.id)
416-
}
417-
418408
/// Changes the [`EffectId`] stored in this [`Effect`].
419409
///
420410
/// By default, effects use ID `-1`, which is appropriate when uploading a new effect to a
@@ -428,31 +418,21 @@ impl Effect<'_> {
428418
self
429419
}
430420

431-
#[inline]
432-
pub fn direction(&self) -> u16 {
433-
self.raw.direction
434-
}
435-
436421
#[inline]
437422
pub fn with_direction(mut self, dir: u16) -> Self {
438423
self.raw.direction = dir;
439424
self
440425
}
441426

442-
#[inline]
443-
pub fn trigger(&self) -> Trigger {
444-
Trigger(self.raw.trigger)
445-
}
446-
447427
#[inline]
448428
pub fn with_trigger(mut self, trigger: Trigger) -> Self {
449429
self.raw.trigger = trigger.0;
450430
self
451431
}
452432

453433
#[inline]
454-
pub fn replay(&self) -> Replay {
455-
Replay(self.raw.replay)
434+
pub fn effect_type(&self) -> EffectType {
435+
EffectType(self.raw.type_)
456436
}
457437

458438
#[inline]
@@ -461,6 +441,26 @@ impl Effect<'_> {
461441
self
462442
}
463443

444+
#[inline]
445+
pub fn id(&self) -> EffectId {
446+
EffectId(self.raw.id)
447+
}
448+
449+
#[inline]
450+
pub fn direction(&self) -> u16 {
451+
self.raw.direction
452+
}
453+
454+
#[inline]
455+
pub fn trigger(&self) -> Trigger {
456+
Trigger(self.raw.trigger)
457+
}
458+
459+
#[inline]
460+
pub fn replay(&self) -> Replay {
461+
Replay(self.raw.replay)
462+
}
463+
464464
pub fn kind(&self) -> Option<EffectKind<'_>> {
465465
// Safety relies on making it impossible to construct `Effect`s with a mismatched type.
466466
unsafe {

0 commit comments

Comments
 (0)