Skip to content

Commit e6d870e

Browse files
committed
Remove the FIXME about the cache size checks
And leave a NOTE.
1 parent f3da046 commit e6d870e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

crates/std_detect/src/detect/cache.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ impl Default for Initializer {
4343
}
4444
}
4545

46+
// NOTE: the `debug_assert!` would catch that we do not add more Features than
47+
// the one fitting our cache.
4648
impl Initializer {
4749
/// Tests the `bit` of the cache.
4850
#[allow(dead_code)]
4951
#[inline]
5052
pub(crate) fn test(self, bit: u32) -> bool {
51-
// FIXME: this way of making sure that the cache is large enough is
52-
// brittle.
5353
debug_assert!(
5454
bit < CACHE_CAPACITY,
5555
"too many features, time to increase the cache size!"
@@ -60,8 +60,6 @@ impl Initializer {
6060
/// Sets the `bit` of the cache.
6161
#[inline]
6262
pub(crate) fn set(&mut self, bit: u32) {
63-
// FIXME: this way of making sure that the cache is large enough is
64-
// brittle.
6563
debug_assert!(
6664
bit < CACHE_CAPACITY,
6765
"too many features, time to increase the cache size!"
@@ -73,8 +71,6 @@ impl Initializer {
7371
/// Unsets the `bit` of the cache.
7472
#[inline]
7573
pub(crate) fn unset(&mut self, bit: u32) {
76-
// FIXME: this way of making sure that the cache is large enough is
77-
// brittle.
7874
debug_assert!(
7975
bit < CACHE_CAPACITY,
8076
"too many features, time to increase the cache size!"

0 commit comments

Comments
 (0)