Skip to content

Commit

Permalink
fix up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
carljm committed Aug 16, 2024
1 parent 07748b7 commit d79cf00
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
//! dominates, but it does dominate the `x = 1 if flag2 else None` definition, so we have to keep
//! track of that.
//!
//! The data structures used here ([`BitSet`] and [`BitSetArray`]) optimize for keeping all data
//! inline (avoiding lots of scattered allocations) in small-to-medium cases, and falling back to
//! heap allocation to be able to scale to arbitrary numbers of definitions and constraints when
//! The data structures used here ([`BitSet`] and [`smallvec::SmallVec`]) optimize for keeping all
//! data inline (avoiding lots of scattered allocations) in small-to-medium cases, and falling back
//! to heap allocation to be able to scale to arbitrary numbers of definitions and constraints when
//! needed.
use super::bitset::{BitSet, BitSetIterator};
use ruff_index::newtype_index;
Expand All @@ -65,7 +65,7 @@ const INLINE_CONSTRAINT_BLOCKS: usize = 2;
/// Can keep inline this many visible definitions per symbol at a given time; more will go to heap.
const INLINE_VISIBLE_DEFINITIONS_PER_SYMBOL: usize = 4;

/// A [`BitSetArray`];one [`BitSet`] of applicable [`ScopedConstraintId`] per visible definition.
/// One [`BitSet`] of applicable [`ScopedConstraintId`] per visible definition.
type Constraints =
SmallVec<[BitSet<INLINE_CONSTRAINT_BLOCKS>; INLINE_VISIBLE_DEFINITIONS_PER_SYMBOL]>;
type ConstraintsIterator<'a> = std::slice::Iter<'a, BitSet<INLINE_CONSTRAINT_BLOCKS>>;
Expand All @@ -78,7 +78,7 @@ pub(super) struct SymbolState {

/// For each definition, which [`ScopedConstraintId`] apply?
///
/// This is a [`BitSetArray`] which should always have one [`BitSet`] of constraints per
/// This is a [`smallvec::SmallVec`] which should always have one [`BitSet`] of constraints per
/// definition in `visible_definitions`.
constraints: Constraints,

Expand Down

0 comments on commit d79cf00

Please sign in to comment.