Minor refactoring: simplify `getLength`
1 file changed