diff --git a/.travis.yml b/.travis.yml index ac596e7..c8db336 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: rust +env: + - RUSTFLAGS="-D warnings" matrix: include: - rust: stable diff --git a/Cargo.toml b/Cargo.toml index 30036fe..5feebac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-lua" -version = "0.2.0" +version = "0.3.0" authors = ["Poga Po "] description = "Define Actix actor with Lua" repository = "https://github.com/poga/actix-lua" @@ -21,7 +21,6 @@ futures = "0.1" tokio = "0.1" rlua = "0.14" uuid = { version = "0.6", features = ["v4"] } -rust-embed = "3.0" [dev-dependencies] futures-timer = "0.1" \ No newline at end of file diff --git a/src/actor.rs b/src/actor.rs index 138f6dd..2da2e26 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -13,10 +13,6 @@ use message::LuaMessage; use builder::LuaActorBuilder; -#[derive(RustEmbed)] -#[folder = "src/lua/"] -struct Asset; - /// Top level struct which holds a lua state for itself. /// /// `LuaActor` exposed most of the actix context API to the lua enviroment. @@ -58,9 +54,8 @@ impl LuaActor { stopped: Option, ) -> Result { let vm = Lua::new(); - // vm.eval::<()>(&script, Some("Init"))?; - let prelude = Asset::get("prelude.lua").unwrap(); - vm.eval::<()>(&str::from_utf8(&prelude).unwrap(), Some("Prelude"))?; + let prelude = include_str!("lua/prelude.lua"); + vm.eval::<()>(prelude, Some("Prelude"))?; { let load: Function = vm.globals().get("__load").unwrap(); if let Some(script) = started { diff --git a/src/lib.rs b/src/lib.rs index a81a923..65387b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -37,9 +37,6 @@ extern crate rlua; extern crate tokio; extern crate uuid; -#[macro_use] -extern crate rust_embed; - #[cfg(test)] extern crate futures_timer;