diff --git a/lib.go b/lib.go index 4cf6d86..cd6e6be 100644 --- a/lib.go +++ b/lib.go @@ -38,8 +38,7 @@ func (e editorFunc[S]) Edit(r rune, state any) ([]rune, any) { func (e editorFunc[S]) ReleaseState(state any) []rune { s, _ := state.(S) - r := e.releaseState(s) - return r + return e.releaseState(s) } // Func can be used to define an Editor providing only the edit and releaseState functions.