avoid config copy for document store (#669)

This commit is contained in:
Techatrix
2022-09-22 01:31:48 +00:00
committed by GitHub
parent dac0d9019a
commit e9e9571fe5
6 changed files with 44 additions and 37 deletions

View File

@@ -660,7 +660,7 @@ fn writeNodeInlayHint(builder: *Builder, arena: *std.heap.ArenaAllocator, store:
/// `InlayHint.tooltip.value` has to deallocated separately
pub fn writeRangeInlayHint(
arena: *std.heap.ArenaAllocator,
config: *const Config,
config: Config,
store: *DocumentStore,
handle: *DocumentStore.Handle,
range: types.Range,
@@ -669,7 +669,7 @@ pub fn writeRangeInlayHint(
) error{OutOfMemory}![]types.InlayHint {
var builder: Builder = .{
.allocator = arena.child_allocator,
.config = config,
.config = &config,
.handle = handle,
.hints = .{},
.hover_kind = hover_kind,