summaryrefslogtreecommitdiff
path: root/examples/async_http_reqwest.rs
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2021-04-27 00:29:24 +0100
committerAlex Orlenko <zxteam@protonmail.com>2021-04-27 00:38:13 +0100
commit2fae94586dc83440409f0c7c3a9247fa576dff20 (patch)
tree3e0a9d3d876055b28c8adf1c80084c58f541ed3c /examples/async_http_reqwest.rs
parentbc81d1016f721d088542a68e26d63570c1db0bbd (diff)
downloadmlua-2fae94586dc83440409f0c7c3a9247fa576dff20.zip
Remove Result from lua.null() and lua.array_metatable(). They never fail.
Diffstat (limited to 'examples/async_http_reqwest.rs')
-rw-r--r--examples/async_http_reqwest.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/async_http_reqwest.rs b/examples/async_http_reqwest.rs
index 5c68bc6..e80051a 100644
--- a/examples/async_http_reqwest.rs
+++ b/examples/async_http_reqwest.rs
@@ -4,7 +4,7 @@ use mlua::{Error, Lua, LuaSerdeExt, Result};
async fn main() -> Result<()> {
let lua = Lua::new();
let globals = lua.globals();
- globals.set("null", lua.null()?)?;
+ globals.set("null", lua.null())?;
let fetch_json = lua.create_async_function(|lua, uri: String| async move {
let resp = reqwest::get(&uri)