Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Correctly reference utils module #438

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshua-holmes
Copy link

Hi! I noticed that the utils module (the utils/utils.lua file) was being read as nil. Lua seems to do this weird thing of silently exiting when calling .something on a nil value, so the DAP setup was not working correctly.

This change fixes this issue by importing the utils module like so and adjusting the references to match:

local rt_utils = require('rust-tools.utils.utils')
...
rt_utils.compare(...)

See the photo for evidence that a nil value was being read. On the left is the code I added to log the issue, on the bottom right is the log's output.
screenshot-20231220-210426

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant