mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
fix -vet
This commit is contained in:
@@ -52,7 +52,7 @@ TEMP_ALLOCATOR_GUARD :: #force_inline proc(collisions: []runtime.Allocator, loc
|
||||
|
||||
Temp_Allocator :: struct {
|
||||
using arena: ^runtime.Arena,
|
||||
using allocator: runtime.Allocator
|
||||
using allocator: runtime.Allocator,
|
||||
}
|
||||
|
||||
get_temp_allocator :: proc(tmp: runtime.Arena_Temp, _: runtime.Source_Code_Location) -> Temp_Allocator {
|
||||
|
||||
@@ -206,7 +206,7 @@ copy_directory :: proc(dst, src: string, dst_perm := 0o755) -> Error {
|
||||
|
||||
file_infos := read_all_directory_by_path(src, temp_allocator) or_return
|
||||
for fi in file_infos {
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
|
||||
temp_allocator_scope(temp_allocator)
|
||||
|
||||
dst_path := join_path({dst, fi.name}, temp_allocator) or_return
|
||||
src_path := fi.fullpath
|
||||
|
||||
@@ -51,8 +51,6 @@ Read_Directory_Iterator_Impl :: struct {
|
||||
|
||||
@(require_results)
|
||||
_read_directory_iterator :: proc(it: ^Read_Directory_Iterator) -> (fi: File_Info, index: int, ok: bool) {
|
||||
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({}))
|
||||
|
||||
for !it.impl.no_more_files {
|
||||
err: Error
|
||||
file_info_delete(it.impl.prev_fi, file_allocator())
|
||||
|
||||
Reference in New Issue
Block a user