From 7c24db334e06eed592dae73d4aeed5ae287536bb Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 4 Oct 2021 23:46:32 +0200 Subject: Cosmetics --- src/stack.nim | 2 +- src/stackStack.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/stack.nim b/src/stack.nim index 9ba3e24..f08baf0 100644 --- a/src/stack.nim +++ b/src/stack.nim @@ -5,7 +5,7 @@ type next: ref Stack func NewStack*(size: int = 32, next: ref Stack = nil): ref Stack = - result = new(Stack) + new(result) result.size = size result.data.setlen(size) result.next = next diff --git a/src/stackStack.nim b/src/stackStack.nim index 1bc89c0..d55d5d9 100644 --- a/src/stackStack.nim +++ b/src/stackStack.nim @@ -6,7 +6,7 @@ type head: ref Stack func NewStackStack*(): ref StackStack = - result = new(StackStack) + new(result) result.head = NewStack() result.height = 1 -- cgit v1.2.3