Skip to content

Commit cd0f258

Browse files
committed
memory: hard-assert session type in Save
1 parent 92b0e44 commit cd0f258

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎memory.go‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,7 @@ func (s *memoryStore) Save(_ context.Context, sess Session) error {
178178
s.lock.Lock()
179179
defer s.lock.Unlock()
180180

181-
ms, ok := sess.(*memorySession)
182-
if !ok {
183-
return nil
184-
}
181+
ms := sess.(*memorySession)
185182

186183
// Fast path: the session is already indexed under its current ID, so there is
187184
// nothing to persist.

0 commit comments

Comments
 (0)