Skip to content

Commit b45987b

Browse files
committed
fix warnings
1 parent d6624a8 commit b45987b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/SyntaxLookup.res

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ let default = (props: props) => {
233233
Order all items in tag groups
234234
*/
235235
let categories = {
236-
open Category
237236
let initial = [
238237
Category.Decorators,
239238
Operators,
@@ -243,7 +242,7 @@ let default = (props: props) => {
243242
SpecialValues,
244243
Other,
245244
]->Belt.Array.map(cat => {
246-
(cat->toString, [])
245+
(cat->Category.toString, [])
247246
})
248247

249248
let items = switch state {
@@ -253,7 +252,7 @@ let default = (props: props) => {
253252
}
254253

255254
Belt.Array.reduce(items, Js.Dict.fromArray(initial), (acc, item) => {
256-
let key = item.category->toString
255+
let key = item.category->Category.toString
257256
Js.Dict.get(acc, key)->Belt.Option.mapWithDefault(acc, items => {
258257
Js.Array2.push(items, item)->ignore
259258
Js.Dict.set(acc, key, items)

src/layouts/DocsLayout.res

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,12 @@ module Make = (Content: StaticContent) => {
200200
let activeToc: option<SidebarLayout.Toc.t> = {
201201
open Belt.Option
202202
Js.Dict.get(Content.tocData, route)->map(data => {
203-
open SidebarLayout.Toc
204203
let title = data["title"]
205204
let entries = Belt.Array.map(data["headers"], header => {
206-
header: header["name"],
205+
SidebarLayout.Toc.header: header["name"],
207206
href: "#" ++ header["href"],
208207
})
209-
{title, entries}
208+
{SidebarLayout.Toc.title, entries}
210209
})
211210
}
212211

0 commit comments

Comments
 (0)