commit e5965749d17d5a70f92fdc981f863e85b7543838
parent 43aeb71f2d89ef74227de99a065c4af3a38fc755
Author: Charlie Stanton <charlie@shtanton.xyz>
Date: Wed, 26 Apr 2023 10:58:00 +0100
Slightly improve code quality of JSONIn.Read
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/walk/read.go b/walk/read.go
@@ -179,10 +179,10 @@ func (in *JSONIn) Read() (WalkItem, error) {
}
}
action := in.actionBuffer[in.actionIndex]
+ in.actionIndex++
switch action {
case ActionReadValue:
value := in.readValue()
- in.actionIndex++
return WalkItem {
Value: value,
Path: in.path,
@@ -208,7 +208,6 @@ func (in *JSONIn) Read() (WalkItem, error) {
default:
panic("Invalid ReadAction")
}
- in.actionIndex++
}
}