Skip to content

Commit

Permalink
Fix recursive codec example (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChampionAsh5357 authored May 21, 2024
1 parent 93331a2 commit 54103be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/datastorage/codecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public static final Codec<RecursiveObject> RECURSIVE_CODEC = Codec.recursive(
RecursiveObject.class.getSimpleName(), // This is for the toString method
recursedCodec -> RecordCodecBuilder.create(instance -> instance.group(
recursedCodec.optionalFieldOf("inner").forGetter(RecursiveObject::inner)
), RecursiveObject::new)
).apply(instance, RecursiveObject::new))
);
```

Expand Down

0 comments on commit 54103be

Please sign in to comment.