mirror of
https://github.com/nushell/nushell.git
synced 2025-04-16 17:28:19 +02:00
Tidy up crates in nu-protocol (#2611)
* Remove unneeded crates from nu-protocol * Simplify join, use std fn
This commit is contained in:
parent
cf43b74f26
commit
bd015e82dc
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -3048,15 +3048,12 @@ dependencies = [
|
|||||||
name = "nu-protocol"
|
name = "nu-protocol"
|
||||||
version = "0.20.0"
|
version = "0.20.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.12.1",
|
|
||||||
"bigdecimal",
|
"bigdecimal",
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
"chrono",
|
"chrono",
|
||||||
"codespan-reporting",
|
|
||||||
"derive-new",
|
"derive-new",
|
||||||
"getset",
|
"getset",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"itertools",
|
|
||||||
"log 0.4.11",
|
"log 0.4.11",
|
||||||
"nu-errors",
|
"nu-errors",
|
||||||
"nu-source",
|
"nu-source",
|
||||||
|
@ -10,15 +10,12 @@ version = "0.20.0"
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ansi_term = "0.12.1"
|
|
||||||
bigdecimal = {version = "0.2.0", features = ["serde"]}
|
bigdecimal = {version = "0.2.0", features = ["serde"]}
|
||||||
byte-unit = "4.0.9"
|
byte-unit = "4.0.9"
|
||||||
chrono = {version = "0.4.15", features = ["serde"]}
|
chrono = {version = "0.4.15", features = ["serde"]}
|
||||||
codespan-reporting = "0.9.5"
|
|
||||||
derive-new = "0.5.8"
|
derive-new = "0.5.8"
|
||||||
getset = "0.1.1"
|
getset = "0.1.1"
|
||||||
indexmap = {version = "1.6.0", features = ["serde-1"]}
|
indexmap = {version = "1.6.0", features = ["serde-1"]}
|
||||||
itertools = "0.9.0"
|
|
||||||
log = "0.4.11"
|
log = "0.4.11"
|
||||||
nu-errors = {path = "../nu-errors", version = "0.20.0"}
|
nu-errors = {path = "../nu-errors", version = "0.20.0"}
|
||||||
nu-source = {path = "../nu-source", version = "0.20.0"}
|
nu-source = {path = "../nu-source", version = "0.20.0"}
|
||||||
|
@ -16,12 +16,11 @@ use crate::value::dict::Dictionary;
|
|||||||
use crate::value::iter::{RowValueIter, TableValueIter};
|
use crate::value::iter::{RowValueIter, TableValueIter};
|
||||||
use crate::value::primitive::Primitive;
|
use crate::value::primitive::Primitive;
|
||||||
use crate::value::range::{Range, RangeInclusion};
|
use crate::value::range::{Range, RangeInclusion};
|
||||||
use crate::{ColumnPath, PathMember, UnspannedPathMember};
|
use crate::{ColumnPath, PathMember};
|
||||||
use bigdecimal::BigDecimal;
|
use bigdecimal::BigDecimal;
|
||||||
use bigdecimal::FromPrimitive;
|
use bigdecimal::FromPrimitive;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use itertools::Itertools;
|
|
||||||
use nu_errors::ShellError;
|
use nu_errors::ShellError;
|
||||||
use nu_source::{AnchorLocation, HasSpan, Span, Spanned, Tag};
|
use nu_source::{AnchorLocation, HasSpan, Span, Spanned, Tag};
|
||||||
use num_bigint::BigInt;
|
use num_bigint::BigInt;
|
||||||
@ -314,12 +313,10 @@ impl Value {
|
|||||||
UntaggedValue::Primitive(Primitive::Filesize(x)) => format!("{}", x),
|
UntaggedValue::Primitive(Primitive::Filesize(x)) => format!("{}", x),
|
||||||
UntaggedValue::Primitive(Primitive::Path(x)) => format!("{}", x.display()),
|
UntaggedValue::Primitive(Primitive::Path(x)) => format!("{}", x.display()),
|
||||||
UntaggedValue::Primitive(Primitive::ColumnPath(path)) => {
|
UntaggedValue::Primitive(Primitive::ColumnPath(path)) => {
|
||||||
let joined = path
|
let joined: String = path
|
||||||
.iter()
|
.iter()
|
||||||
.map(|member| match &member.unspanned {
|
.map(|member| member.as_string())
|
||||||
UnspannedPathMember::String(name) => name.to_string(),
|
.collect::<Vec<String>>()
|
||||||
UnspannedPathMember::Int(n) => format!("{}", n),
|
|
||||||
})
|
|
||||||
.join(".");
|
.join(".");
|
||||||
|
|
||||||
if joined.contains(' ') {
|
if joined.contains(' ') {
|
||||||
|
Loading…
Reference in New Issue
Block a user