forked from extern/nushell
771e24913d
# Description A compromise fix for #8162. Nushell range operator now accepts `..=` to mean the range includes the top value, so you can use your Rust habits. But the unadorned `..` range operator also includes the value, so you can also use your Nushell habits. _(Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience.)_ ```nushell 〉1..5 ╭───┬───╮ │ 0 │ 1 │ │ 1 │ 2 │ │ 2 │ 3 │ │ 3 │ 4 │ │ 4 │ 5 │ ╰───┴───╯ -------------------------------------------- /home/bobhy/src/rust/nushell -------------------------------------------- 〉1..=5 ╭───┬───╮ │ 0 │ 1 │ │ 1 │ 2 │ │ 2 │ 3 │ │ 3 │ 4 │ │ 4 │ 5 │ ╰───┴───╯ -------------------------------------------- /home/bobhy/src/rust/nushell -------------------------------------------- 〉1..<5 ╭───┬───╮ │ 0 │ 1 │ │ 1 │ 2 │ │ 2 │ 3 │ │ 3 │ 4 │ ╰───┴───╯ ``` # User-Facing Changes Existing scripts with range operator will continue to operate as heretofore. _(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: - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass # After Submitting Will update the book to include new syntax.
31 lines
867 B
TOML
31 lines
867 B
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "Nushell's parser"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu-parser"
|
|
version = "0.78.1"
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
bytesize = "1.2.0"
|
|
chrono = { default-features = false, features = ['std'], version = "0.4.23" }
|
|
itertools = "0.10"
|
|
miette = {version = "5.7.0", features = ["fancy-no-backtrace"]}
|
|
thiserror = "1.0.31"
|
|
serde_json = "1.0"
|
|
nu-path = {path = "../nu-path", version = "0.78.1" }
|
|
nu-protocol = { path = "../nu-protocol", version = "0.78.1" }
|
|
nu-plugin = { path = "../nu-plugin", optional = true, version = "0.78.1" }
|
|
nu-engine = { path = "../nu-engine", version = "0.78.1" }
|
|
log = "0.4"
|
|
|
|
[dev-dependencies]
|
|
rstest = { version = "0.16.0", default-features = false }
|
|
|
|
[features]
|
|
plugin = ["nu-plugin"]
|