Remove dead-code and clarify note.

This commit is contained in:
KtorZ 2024-10-19 11:00:46 +02:00
parent 53685dd1d5
commit 365b3bf5bf
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 6 additions and 17 deletions

View File

@ -33,12 +33,6 @@ const BLST_P2_COMPRESSED_SIZE: usize = 96;
pub const INTEGER_TO_BYTE_STRING_MAXIMUM_OUTPUT_LENGTH: i64 = 8192; pub const INTEGER_TO_BYTE_STRING_MAXIMUM_OUTPUT_LENGTH: i64 = 8192;
//#[derive(std::cmp::PartialEq)]
//pub enum EvalMode {
// Immediate,
// Deferred,
//}
pub enum BuiltinSemantics { pub enum BuiltinSemantics {
V1, V1,
V2, V2,
@ -1384,17 +1378,12 @@ impl DefaultFunction {
let size = args[1].unwrap_integer()?; let size = args[1].unwrap_integer()?;
let input = args[2].unwrap_integer()?; let input = args[2].unwrap_integer()?;
// Since this is checked at cost time it is no longer needed // NOTE:
// if size.is_negative() { // We ought to also check for negative size and too large sizes. These checks
// return Err(Error::IntegerToByteStringNegativeSize(size.clone())); // however happens prior to calling the builtin as part of the costing step. So by
// } // the time we reach this builtin call, the size can be assumed to be
//
// if size > &INTEGER_TO_BYTE_STRING_MAXIMUM_OUTPUT_LENGTH.into() { // >= 0 && < INTEGER_TO_BYTE_STRING_MAXIMUM_OUTPUT_LENGTH
// return Err(Error::IntegerToByteStringSizeTooBig(
// size.clone(),
// INTEGER_TO_BYTE_STRING_MAXIMUM_OUTPUT_LENGTH,
// ));
// }
if size.is_zero() if size.is_zero()
&& integer_log2(input.clone()) && integer_log2(input.clone())