From 0df847da1562135188ce4d2062d7bccfcf1a3b99 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 7 Mar 2023 19:02:48 -0600 Subject: [PATCH] fixed an error message that popped up after landing (#8356) # Description This PR fixes an error message that popped up after landing a PR #8337. I guess there were too many changes since the PR was submitted? # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # 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 # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --- crates/nu-command/src/conversions/into/int.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/nu-command/src/conversions/into/int.rs b/crates/nu-command/src/conversions/into/int.rs index fbc98ab006..2fcfcbb51a 100644 --- a/crates/nu-command/src/conversions/into/int.rs +++ b/crates/nu-command/src/conversions/into/int.rs @@ -232,9 +232,10 @@ fn action(input: &Value, args: &Arguments, span: Span) -> Value { .unwrap() { Value::Error { - error: ShellError::IncorrectValue( - "DateTime out of range for timestamp: 1677-09-21T00:12:43Z to 2262-04-11T23:47:16".to_string(), - span), + error: ShellError::IncorrectValue { + msg: "DateTime out of range for timestamp: 1677-09-21T00:12:43Z to 2262-04-11T23:47:16".to_string(), + span + }, } } else { Value::Int { @@ -522,7 +523,7 @@ mod test { Span::test_data(), ); if let Value::Error { - error: ShellError::IncorrectValue(e, ..), + error: ShellError::IncorrectValue { msg: e, .. }, } = actual { assert!(