diff --git a/carabiner/cast.py b/carabiner/cast.py index 5369403..9c68167 100644 --- a/carabiner/cast.py +++ b/carabiner/cast.py @@ -180,15 +180,10 @@ def _(x: TextIOWrapper): def _cast_base(object: Any, to: str, *args, **kwargs): - try: - casting_function = CASTING_FUNCTIONS[to] - except KeyError: - raise TypeError(f"Cannot cast {type(object).__name__} to {to}.") - return casting_function(object, *args, **kwargs)