From 38fc42d3529b818475ae7c9e4facec9c6cc9510a Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Tue, 27 Dec 2022 15:44:03 +0800 Subject: [PATCH] Fix const examples (#7610) # Description Fix const examples # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass --- crates/nu-command/src/core_commands/const_.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/core_commands/const_.rs b/crates/nu-command/src/core_commands/const_.rs index ef13c3a9e2..190f31e731 100644 --- a/crates/nu-command/src/core_commands/const_.rs +++ b/crates/nu-command/src/core_commands/const_.rs @@ -72,12 +72,12 @@ impl Command for Const { vec![ Example { description: "Create a new parse-time constant.", - example: "let x = 10", + example: "const x = 10", result: None, }, Example { description: "Create a composite constant value", - example: "let x = { a: 10, b: 20 }", + example: "const x = { a: 10, b: 20 }", result: None, }, ]