Skip to content

Commit

Permalink
fix: enum representation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
saecki committed Jan 17, 2024
1 parent 43e5654 commit 6738374
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/crates/popup/dependencies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ local async = require("crates.async")
local core = require("crates.core")
local popup = require("crates.popup.common")
local state = require("crates.state")
local types = require("crates.types")
local ApiDependencyKind = types.ApiDependencyKind
local util = require("crates.util")

local M = {}
Expand Down Expand Up @@ -190,11 +192,11 @@ function M.open_deps(ctx, crate_name, version, opts)
local t = { text = text, hl = hl }

local line = { t, dep = d }
if d.kind == "normal" then
if d.kind == ApiDependencyKind.NORMAL then
table.insert(normal_deps_text, line)
elseif d.kind == "build" then
elseif d.kind == ApiDependencyKind.BUILD then
table.insert(build_deps_text, line)
elseif d.kind == "dev" then
elseif d.kind == ApiDependencyKind.DEV then
table.insert(dev_deps_text, line)
end
table.insert(deps_text_index, line)
Expand Down

0 comments on commit 6738374

Please sign in to comment.