Skip to content

Commit 162ee88

Browse files
committed
fix doctests
1 parent 7e61c30 commit 162ee88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ An example can be seen below
6767
6868
fn main() -> std::io::Result<()> {
6969
let mut app = App::new();
70-
app.add_plugin(ScriptingPlugin)
70+
app.add_plugins(ScriptingPlugin)
7171
.add_plugins(DefaultPlugins)
7272
// pick and register only the hosts you want to use
7373
// use any system set AFTER any systems which add/remove/modify script components
@@ -191,7 +191,7 @@ pub fn load_a_script(
191191
) {
192192
// this handle is kept by the script so it will not be unloaded
193193
let path = "scripts/console_integration.lua".to_string();
194-
let handle = server.load::<LuaFile, &str>(&path);
194+
let handle = server.load::<LuaFile>(&path);
195195

196196

197197
commands.spawn(()).insert(ScriptCollection::<LuaFile> {
@@ -252,7 +252,7 @@ Register the API providers like so:
252252

253253
```rust, ignore
254254
app.add_plugins(DefaultPlugins)
255-
.add_plugin(ScriptingPlugin)
255+
.add_plugins(ScriptingPlugin)
256256
.add_script_host::<LuaScriptHost<MyLuaArg>>(PostUpdate)
257257
.add_script_host::<RhaiScriptHost<MyRhaiArg>>(PostUpdate)
258258
.add_api_provider::<LuaScriptHost<MyLuaArg>>(Box::new(LuaAPIProvider))
@@ -275,7 +275,7 @@ fn main() -> std::io::Result<()> {
275275
let mut app = App::new();
276276
277277
app.add_plugins(DefaultPlugins)
278-
.add_plugin(ScriptingPlugin)
278+
.add_plugins(ScriptingPlugin)
279279
.add_script_host::<LuaScriptHost<()>>(PostUpdate)
280280
// Note: This is a noop in optimized builds unless the `doc_always` feature is enabled!
281281
// this will pickup any API providers added *BEFOREHAND* like this one

0 commit comments

Comments
 (0)