From ea42a84a4a1183647141b1c134377558ce58e8fb Mon Sep 17 00:00:00 2001 From: "ken.chen" Date: Tue, 27 Jul 2021 22:03:52 +0800 Subject: [PATCH] Update implementing_a_command.md (#3848) + nu-command/src/command.rs has been modified to nu-command/src/mod.rs in nowable version --- docs/implementing_a_command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/implementing_a_command.md b/docs/implementing_a_command.md index ef0504a84..41eb2fcaa 100644 --- a/docs/implementing_a_command.md +++ b/docs/implementing_a_command.md @@ -86,7 +86,7 @@ pub struct Command; Before registering it to the context you need to make it available by declaring the module and re-export it in `crates/nu-command/src/commands.rs`. The commands we write are modules already (`take_two.rs` is the `take_two` module). In case you are not familiar with rust modules [read this refresher](https://doc.rust-lang.org/book/ch07-02-defining-modules-to-control-scope-and-privacy.html). Let's go ahead and declare it and then re-export the command's `Command` struct as `TakeTwo`, like so: -_nu-command/src/commands.rs_ +_nu-command/src/mod.rs_ ```rust # ... pub(crate) mod take_two; @@ -267,4 +267,4 @@ Not bad. We created first a list of int values and took two of them. Let's creat ───┴────────── ``` -The command is ready. \ No newline at end of file +The command is ready.