Add missing data size check.

This commit is contained in:
Stephen Chung
2022-01-28 08:28:31 +08:00
parent b9f2fdb635
commit b86dd3f586
2 changed files with 13 additions and 7 deletions

View File

@@ -23,6 +23,8 @@ pub struct OpAssignment<'a> {
/// Hash of the underlying operator call (for fallback).
pub hash_op: u64,
/// Op-assignment operator.
pub op_assign: &'a str,
/// Underlying operator.
pub op: &'a str,
}
@@ -51,7 +53,8 @@ impl OpAssignment<'_> {
Self {
hash_op_assign: calc_fn_hash(op.literal_syntax(), 2),
hash_op: calc_fn_hash(op_raw, 2),
op: op.literal_syntax(),
op_assign: op.literal_syntax(),
op: op_raw,
}
}
/// Create a new [`OpAssignment`] from a base operator.