Skip to content

Commit

Permalink
fix: Froze dataclasses.
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelrubin committed Jun 25, 2022
1 parent 3c916c6 commit ade63af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rustshed/option_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def Q(self) -> T_co:
"""


@dataclass
@dataclass(frozen=True, slots=True)
class Some(_BaseOption[T_co]):
value: T_co

Expand Down Expand Up @@ -434,7 +434,7 @@ def Q(self) -> T_co:
return self.value


@dataclass
@dataclass(frozen=True, slots=True)
class NullType(_BaseOption[Any]):
def __str__(self) -> str:
return "Null"
Expand Down Expand Up @@ -757,7 +757,7 @@ def Q(self) -> T_co:
... # pragma: no cover


@dataclass
@dataclass(frozen=True, slots=True)
class Ok(_BaseResult[T_co, Any]):
value: T_co

Expand Down Expand Up @@ -861,7 +861,7 @@ def Q(self) -> T_co:
return self.value


@dataclass
@dataclass(frozen=True, slots=True)
class Err(_BaseResult[Any, E_co]):
error: E_co

Expand Down

0 comments on commit ade63af

Please sign in to comment.