Streamline code.

This commit is contained in:
Stephen Chung
2021-03-24 10:02:50 +08:00
parent 6d1700728a
commit 3d0d5d1708
10 changed files with 99 additions and 105 deletions

View File

@@ -1513,7 +1513,7 @@ impl FloatWrapper {
#[derive(Debug, Clone, Hash)]
pub enum Expr {
/// Dynamic constant.
/// Used to hold either an [`Array`] or [`Map`] literal for quick cloning.
/// Used to hold either an [`Array`] or [`Map`][crate::Map] literal for quick cloning.
/// All other primitive data types should use the appropriate variants for better speed.
DynamicConstant(Box<Dynamic>, Position),
/// Boolean constant.
@@ -1855,7 +1855,7 @@ mod tests {
assert_eq!(size_of::<Option<ast::Expr>>(), 16);
assert_eq!(size_of::<ast::Stmt>(), 40);
assert_eq!(size_of::<Option<ast::Stmt>>(), 40);
assert_eq!(size_of::<FnPtr>(), 32);
assert_eq!(size_of::<FnPtr>(), 80);
assert_eq!(size_of::<Scope>(), 288);
assert_eq!(size_of::<LexError>(), 56);
assert_eq!(size_of::<ParseError>(), 16);