Skip to content

Commit

Permalink
Remove #[allow(deprecated)] & #[allow(dead_code)] (#1656)
Browse files Browse the repository at this point in the history
* Remove `#[allow(deprecated)]` & `#[allow(dead_code)]``
"
"

* Remove allow(dead_code)
  • Loading branch information
fmoletta authored Apr 5, 2024
1 parent 69ae745 commit 4777afd
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion vm/src/hint_processor/builtin_hint_processor/math_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ pub fn sqrt(
)));
//This is equal to mod_value > bigint!(2).pow(250)
}
#[allow(deprecated)]
insert_value_from_var_name(
"root",
Felt252::from(&isqrt(&mod_value.to_biguint())?),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,17 @@ mod tests {
constants.insert(BASE_86.to_string(), crate::math_utils::pow2_const(86));

let array_1 = bigint3_split(&BigUint::zero());
#[allow(deprecated)]
let array_2 = bigint3_split(
&bigint!(999992)
.to_biguint()
.expect("Couldn't convert to BigUint"),
);
#[allow(deprecated)]
let array_3 = bigint3_split(
&bigint_str!("7737125245533626718119526477371252455336267181195264773712524553362")
.to_biguint()
.expect("Couldn't convert to BigUint"),
);
//TODO, Check SecpSplitutOfRange limit
#[allow(deprecated)]
let array_4 = bigint3_split(
&bigint_str!(
"773712524553362671811952647737125245533626718119526477371252455336267181195264"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ pub fn get_point_from_x(
constants: &HashMap<String, Felt252>,
) -> Result<(), HintError> {
exec_scopes.insert_value("SECP_P", SECP_P.clone());
#[allow(deprecated)]
let beta = constants
.get(BETA)
.ok_or_else(|| HintError::MissingConstant(Box::new(BETA)))?
Expand All @@ -122,7 +121,6 @@ pub fn get_point_from_x(
// Divide by 4
let mut y = y_cube_int.modpow(&(&*SECP_P + 1_u32).shr(2_u32), &SECP_P);

#[allow(deprecated)]
let v = get_integer_from_var_name("v", vm, ids_data, ap_tracking)?.to_bigint();
if v.is_even() != y.is_even() {
y = &*SECP_P - y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub struct DictTrackerExecScope {
/// The data of the dictionary.
data: HashMap<Felt252, MaybeRelocatable>,
/// The index of the dictionary in the dict_infos segment.
#[allow(dead_code)]
idx: usize,
}

Expand Down
2 changes: 0 additions & 2 deletions vm/src/types/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl CairoLayout {
}
}

#[allow(dead_code)]
pub(crate) fn recursive_instance() -> CairoLayout {
CairoLayout {
_name: String::from("recursive"),
Expand Down Expand Up @@ -120,7 +119,6 @@ impl CairoLayout {
}
}

#[allow(dead_code)]
pub(crate) fn all_cairo_instance() -> CairoLayout {
CairoLayout {
_name: String::from("all_cairo"),
Expand Down
1 change: 0 additions & 1 deletion vm/src/vm/vm_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,6 @@ impl VirtualMachine {

let segment_used_sizes = self.segments.compute_effective_sizes();
let segment_index = builtin.base();
#[allow(deprecated)]
for i in 0..segment_used_sizes[segment_index] {
let formatted_value = match self
.segments
Expand Down

0 comments on commit 4777afd

Please sign in to comment.