Skip to content

Commit 6bb501e

Browse files
JulianGCalderonFrancoGiachetta
authored andcommitted
Replace todos with errors (#1147)
1 parent 5709570 commit 6bb501e

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

src/libfuncs.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use crate::{
66
error::{panic::ToNativeAssertError, Error as CoreLibfuncBuilderError, Result},
77
metadata::MetadataStorage,
8+
native_panic,
89
types::TypeBuilder,
910
utils::BlockExt,
1011
};
@@ -145,7 +146,7 @@ impl LibfuncBuilder for CoreConcreteLibfunc {
145146
Self::Debug(selector) => self::debug::build(
146147
context, registry, entry, location, helper, metadata, selector,
147148
),
148-
Self::Trace(_) => todo!("Implement trace libfunc"),
149+
Self::Trace(_) => native_panic!("Implement trace libfunc"),
149150
Self::Drop(info) => {
150151
self::drop::build(context, registry, entry, location, helper, metadata, info)
151152
}
@@ -165,7 +166,7 @@ impl LibfuncBuilder for CoreConcreteLibfunc {
165166
context, registry, entry, location, helper, metadata, selector,
166167
),
167168
Self::Felt252SquashedDict(_) => {
168-
todo!("Implement felt252_squashed_dict libfunc")
169+
native_panic!("Implement felt252_squashed_dict libfunc")
169170
}
170171
Self::Felt252DictEntry(selector) => self::felt252_dict_entry::build(
171172
context, registry, entry, location, helper, metadata, selector,

src/libfuncs/gas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn build<'ctx, 'this>(
4848
build_get_builtin_costs(context, registry, entry, location, helper, metadata, info)
4949
}
5050
GasConcreteLibfunc::GetUnspentGas(_) => {
51-
todo!("Implement GetUnspentGas libfunc");
51+
native_panic!("Implement GetUnspentGas libfunc");
5252
}
5353
}
5454
}

src/libfuncs/starknet.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use crate::{
55
error::{Error, Result},
66
ffi::get_struct_field_type_at,
77
metadata::{drop_overrides::DropOverridesMeta, MetadataStorage},
8+
native_panic,
89
starknet::handler::StarknetSyscallHandlerCallbacks,
910
utils::{get_integer_layout, BlockExt, GepIndex, ProgramRegistryExt, PRIME},
1011
};
@@ -140,7 +141,7 @@ pub fn build<'ctx, 'this>(
140141
context, registry, entry, location, helper, metadata, info,
141142
),
142143
StarknetConcreteLibfunc::MetaTxV0(_) => {
143-
todo!("Implement MetaTxV0 libfunc");
144+
native_panic!("Implement MetaTxV0 libfunc");
144145
}
145146
#[cfg(feature = "with-cheatcode")]
146147
StarknetConcreteLibfunc::Testing(TestingConcreteLibfunc::Cheatcode(info)) => {

src/values.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ impl Value {
998998
y: y.into(),
999999
}
10001000
}
1001-
CoreTypeConcrete::Blake(_) => todo!("Implement from_ptr for Blake type"),
1001+
CoreTypeConcrete::Blake(_) => native_panic!("Implement from_ptr for Blake type"),
10021002
}
10031003
})
10041004
}

0 commit comments

Comments
 (0)