Browse Source

container/queue: fix init_with_contents

Fixes #4729
Laytan Laats 7 months ago
parent
commit
a5f3c1b849
1 changed files with 1 additions and 2 deletions
  1. 1 2
      core/container/queue/queue.odin

+ 1 - 2
core/container/queue/queue.odin

@@ -46,8 +46,7 @@ init_with_contents :: proc(q: ^$Q/Queue($T), backing: []T) -> bool {
 		cap = builtin.len(backing),
 		allocator = {procedure=runtime.nil_allocator_proc, data=nil},
 	}
-	q.len    = len(backing)
-	q.offset = len(backing)
+	q.len = builtin.len(backing)
 	return true
 }