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> {
247247///Tests macro style binds
248248#[ byondapi:: bind_macro]
249249fn test_new_obj_macro (
250- object : ByondValue ,
251- number : ByondValue ,
252- thing : ByondValue ,
250+ _object : ByondValue ,
251+ _number : ByondValue ,
252+ _thing : ByondValue ,
253253) -> Result < ByondValue > {
254254 Ok ( ByondValue :: builtin_new (
255255 ByondValue :: try_from ( "/datum/testobject" ) ?,
Original file line number Diff line number Diff line change @@ -13,11 +13,12 @@ impl PartialEq for ByondValue {
1313// Debug!
1414impl Debug for ByondValue {
1515 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+ } ;
2122 let typ = format ! ( "{type_enum:?}" ) ;
2223
2324 let value = match type_enum {
You can’t perform that action at this time.
0 commit comments