File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -247,9 +247,9 @@ fn test_new_obj() -> Result<ByondValue> {
247
247
///Tests macro style binds
248
248
#[ byondapi:: bind_macro]
249
249
fn test_new_obj_macro (
250
- object : ByondValue ,
251
- number : ByondValue ,
252
- thing : ByondValue ,
250
+ _object : ByondValue ,
251
+ _number : ByondValue ,
252
+ _thing : ByondValue ,
253
253
) -> Result < ByondValue > {
254
254
Ok ( ByondValue :: builtin_new (
255
255
ByondValue :: try_from ( "/datum/testobject" ) ?,
Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ impl PartialEq for ByondValue {
13
13
// Debug!
14
14
impl Debug for ByondValue {
15
15
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
16
- let type_enum: ValueType = self
17
- . 0
18
- . type_
19
- . try_into ( )
20
- . unwrap_or_else ( |_| panic ! ( "Unimplemented type: {:X}" , self . 0 . type_) ) ;
16
+ let Ok ( type_enum) = self . 0 . type_ . try_into ( ) else {
17
+ return f
18
+ . debug_tuple ( "ByondValue" )
19
+ . field ( & format ! ( "Unknown type: {:X}" , self . 0 . type_) )
20
+ . finish ( ) ;
21
+ } ;
21
22
let typ = format ! ( "{type_enum:?}" ) ;
22
23
23
24
let value = match type_enum {
You can’t perform that action at this time.
0 commit comments