Skip to content

Commit e6f3f53

Browse files
committed
fix docs
1 parent b49d679 commit e6f3f53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/glua.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ pub fn call_function_by_name(
11971197
/// use mt <- glua.then(glua.table([#(glua.string("__index"), glua.function(fun))]))
11981198
/// use _ <- glua.then(glua.call_function(lib.set_metatable(), [tbl, mt]))
11991199
///
1200-
/// glua.index(tbl, "a_key") |> glua.returning(decode.string)
1200+
/// glua.index(tbl, glua.string("a_key")) |> glua.returning(decode.string)
12011201
/// })
12021202
/// // -> Ok("fixed value")
12031203
/// ```
@@ -1228,7 +1228,7 @@ fn do_index(
12281228
/// use mt <- glua.then(glua.table([#(glua.string("__newindex"), glua.function(fun))]))
12291229
/// use _ <- glua.then(glua.call_function(lib.set_metatable(), [tbl, mt]))
12301230
///
1231-
/// glua.new_index(tbl, "my_new_key", glua.string("my_new_value"))
1231+
/// glua.new_index(tbl, glua.string("my_new_key"), glua.string("my_new_value"))
12321232
/// })
12331233
/// // -> Error(glua.LuaRuntimeException(
12341234
/// exception: glua.ErrorCall("this is a read-only table", option.None),

0 commit comments

Comments
 (0)