Make lambda set set private

This commit is contained in:
Ayaz Hafiz 2022-08-10 10:23:47 -07:00
parent a93735473a
commit 64fc60f55f
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 15 additions and 5 deletions

View file

@ -783,7 +783,7 @@ impl<'a> LambdaName<'a> {
#[derive(Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct LambdaSet<'a> {
/// collection of function names and their closure arguments
pub set: &'a [(Symbol, &'a [Layout<'a>])],
set: &'a [(Symbol, &'a [Layout<'a>])],
/// how the closure will be represented at runtime
representation: &'a Layout<'a>,
}
@ -867,6 +867,16 @@ impl<'a> LambdaSet<'a> {
})
}
#[inline(always)]
pub fn len(&self) -> usize {
self.set.len()
}
#[inline(always)]
pub fn is_empty(&self) -> bool {
self.set.is_empty()
}
pub fn layout_for_member_with_lambda_name(
&self,
lambda_name: LambdaName,