Use #unsafe_as

The value can't be any other type, so this should be a safe operation.
This commit is contained in:
Michael Miller 2018-09-12 20:28:36 -06:00
parent fbea3533ea
commit 5b275f3146

View file

@ -82,7 +82,7 @@ module Spectator
def {{name.id}} def {{name.id}}
if (wrapper = @%wrapper) if (wrapper = @%wrapper)
wrapper.as(TypedValueWrapper(typeof(%value))).value wrapper.unsafe_as(TypedValueWrapper(typeof(%value))).value
else else
%value.tap do |value| %value.tap do |value|
@%wrapper = TypedValueWrapper(typeof(%value)).new(value) @%wrapper = TypedValueWrapper(typeof(%value)).new(value)