Skip to content

Commit

Permalink
change type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
its-felix committed Jul 15, 2024
1 parent a62e5ae commit 134a0dd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion option_none.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ func NewNone[T any]() None[T] {
return None[T]{}
}

var _ Option[struct{}] = NewNone[struct{}]()
var _ Option[struct{}] = (*None[struct{}])(nil)
2 changes: 1 addition & 1 deletion option_some.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ func NewSome[T any](v T) Some[T] {
return Some[T]{v}
}

var _ Option[struct{}] = NewSome(struct{}{})
var _ Option[struct{}] = (*Some[struct{}])(nil)
2 changes: 1 addition & 1 deletion result_err.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ func NewErr[T any](err error) Err[T] {
var _ interface {
Result[struct{}]
error
} = Err[struct{}]{}
} = (*Err[struct{}])(nil)
2 changes: 1 addition & 1 deletion result_ok.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ func NewOk[T any](v T) Ok[T] {
return Ok[T]{v}
}

var _ Result[struct{}] = Ok[struct{}]{}
var _ Result[struct{}] = (*Ok[struct{}])(nil)

0 comments on commit 134a0dd

Please sign in to comment.