mirror of
https://github.com/nushell/nushell
synced 2024-12-25 04:23:10 +00:00
revert: move to ahash (#9464)
This PR reverts https://github.com/nushell/nushell/pull/9391 We try not to revert PRs like this, though after discussion with the Nushell team, we decided to revert this one. The main reason is that Nushell, as a codebase, isn't ready for these kinds of optimisations. It's in the part of the development cycle where our main focus should be on improving the algorithms inside of Nushell itself. Once we have matured our algorithms, then we can look for opportunities to switch out technologies we're using for alternate forms. Much of Nushell still has lots of opportunities for tuning the codebase, paying down technical debt, and making the codebase generally cleaner and more robust. This should be the focus. Performance improvements should flow out of that work. Said another, optimisation that isn't part of tuning the codebase is premature at this stage. We need to focus on doing the hard work of making the engine, parser, etc better. # User-Facing Changes Reverts the HashMap -> ahash change. cc @FilipAndersson245
This commit is contained in:
parent
fc1ffe487a
commit
6c730def4b
68 changed files with 53 additions and 81 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -2716,7 +2716,6 @@ dependencies = [
|
||||||
name = "nu-cli"
|
name = "nu-cli"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"atty",
|
"atty",
|
||||||
"chrono",
|
"chrono",
|
||||||
"crossterm 0.26.1",
|
"crossterm 0.26.1",
|
||||||
|
@ -2747,7 +2746,6 @@ dependencies = [
|
||||||
name = "nu-cmd-dataframe"
|
name = "nu-cmd-dataframe"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"chrono",
|
"chrono",
|
||||||
"fancy-regex",
|
"fancy-regex",
|
||||||
"indexmap",
|
"indexmap",
|
||||||
|
@ -2766,7 +2764,6 @@ dependencies = [
|
||||||
name = "nu-cmd-extra"
|
name = "nu-cmd-extra"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"nu-cmd-lang",
|
"nu-cmd-lang",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
"nu-parser",
|
"nu-parser",
|
||||||
|
@ -2779,7 +2776,6 @@ dependencies = [
|
||||||
name = "nu-cmd-lang"
|
name = "nu-cmd-lang"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"fancy-regex",
|
"fancy-regex",
|
||||||
"itertools",
|
"itertools",
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
|
@ -2794,7 +2790,6 @@ dependencies = [
|
||||||
name = "nu-color-config"
|
name = "nu-color-config"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
"nu-json",
|
"nu-json",
|
||||||
|
@ -2809,7 +2804,6 @@ name = "nu-command"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"ahash 0.8.3",
|
|
||||||
"alphanumeric-sort",
|
"alphanumeric-sort",
|
||||||
"atty",
|
"atty",
|
||||||
"base64 0.21.2",
|
"base64 0.21.2",
|
||||||
|
@ -2909,7 +2903,6 @@ dependencies = [
|
||||||
name = "nu-engine"
|
name = "nu-engine"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"nu-glob",
|
"nu-glob",
|
||||||
"nu-path",
|
"nu-path",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
|
@ -2921,7 +2914,6 @@ dependencies = [
|
||||||
name = "nu-explore"
|
name = "nu-explore"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"ansi-str 0.7.2",
|
"ansi-str 0.7.2",
|
||||||
"crossterm 0.26.1",
|
"crossterm 0.26.1",
|
||||||
"lscolors",
|
"lscolors",
|
||||||
|
@ -2958,7 +2950,6 @@ dependencies = [
|
||||||
name = "nu-parser"
|
name = "nu-parser"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"bytesize",
|
"bytesize",
|
||||||
"chrono",
|
"chrono",
|
||||||
"itertools",
|
"itertools",
|
||||||
|
@ -2984,7 +2975,6 @@ dependencies = [
|
||||||
name = "nu-plugin"
|
name = "nu-plugin"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"bincode",
|
"bincode",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
"nu-protocol",
|
"nu-protocol",
|
||||||
|
@ -3006,7 +2996,6 @@ dependencies = [
|
||||||
name = "nu-protocol"
|
name = "nu-protocol"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"byte-unit",
|
"byte-unit",
|
||||||
"chrono",
|
"chrono",
|
||||||
"chrono-humanize",
|
"chrono-humanize",
|
||||||
|
@ -3039,7 +3028,6 @@ dependencies = [
|
||||||
name = "nu-system"
|
name = "nu-system"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"atty",
|
"atty",
|
||||||
"chrono",
|
"chrono",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -3057,7 +3045,6 @@ dependencies = [
|
||||||
name = "nu-table"
|
name = "nu-table"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"nu-ansi-term",
|
"nu-ansi-term",
|
||||||
"nu-color-config",
|
"nu-color-config",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
|
@ -3152,7 +3139,6 @@ dependencies = [
|
||||||
name = "nu_plugin_query"
|
name = "nu_plugin_query"
|
||||||
version = "0.81.1"
|
version = "0.81.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.3",
|
|
||||||
"gjson",
|
"gjson",
|
||||||
"nu-engine",
|
"nu-engine",
|
||||||
"nu-plugin",
|
"nu-plugin",
|
||||||
|
|
|
@ -38,7 +38,6 @@ once_cell = "1.17"
|
||||||
percent-encoding = "2"
|
percent-encoding = "2"
|
||||||
sysinfo = "0.29"
|
sysinfo = "0.29"
|
||||||
unicode-segmentation = "1.10"
|
unicode-segmentation = "1.10"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = []
|
plugin = []
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::completions::{Completer, CompletionOptions, MatchAlgorithm, SortBy};
|
use crate::completions::{Completer, CompletionOptions, MatchAlgorithm, SortBy};
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_engine::eval_call;
|
use nu_engine::eval_call;
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
ast::{Argument, Call, Expr, Expression},
|
ast::{Argument, Call, Expr, Expression},
|
||||||
|
@ -7,6 +6,7 @@ use nu_protocol::{
|
||||||
PipelineData, Span, Type, Value,
|
PipelineData, Span, Type, Value,
|
||||||
};
|
};
|
||||||
use reedline::Suggestion;
|
use reedline::Suggestion;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use super::completer::map_value_completions;
|
use super::completer::map_value_completions;
|
||||||
|
|
|
@ -27,7 +27,6 @@ indexmap = { version = "1.7", features = ["serde-1"] }
|
||||||
num = { version = "0.4", optional = true }
|
num = { version = "0.4", optional = true }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
sqlparser = { version = "0.33", features = ["serde"], optional = true }
|
sqlparser = { version = "0.33", features = ["serde"], optional = true }
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[dependencies.polars]
|
[dependencies.polars]
|
||||||
features = [
|
features = [
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::dataframe::eager::sql_expr::parse_sql_expr;
|
use crate::dataframe::eager::sql_expr::parse_sql_expr;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use polars::error::{ErrString, PolarsError};
|
use polars::error::{ErrString, PolarsError};
|
||||||
use polars::prelude::{col, DataFrame, DataType, IntoLazy, LazyFrame};
|
use polars::prelude::{col, DataFrame, DataType, IntoLazy, LazyFrame};
|
||||||
use sqlparser::ast::{
|
use sqlparser::ast::{
|
||||||
|
@ -7,6 +6,7 @@ use sqlparser::ast::{
|
||||||
};
|
};
|
||||||
use sqlparser::dialect::GenericDialect;
|
use sqlparser::dialect::GenericDialect;
|
||||||
use sqlparser::parser::Parser;
|
use sqlparser::parser::Parser;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct SQLContext {
|
pub struct SQLContext {
|
||||||
|
|
|
@ -19,7 +19,6 @@ nu-protocol = { path = "../nu-protocol", version = "0.81.1" }
|
||||||
|
|
||||||
# Potential dependencies for extras
|
# Potential dependencies for extras
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
extra = ["default"]
|
extra = ["default"]
|
||||||
|
|
|
@ -15,11 +15,11 @@ mod test_examples {
|
||||||
check_example_input_and_output_types_match_command_signature,
|
check_example_input_and_output_types_match_command_signature,
|
||||||
};
|
};
|
||||||
|
|
||||||
use ahash::{HashSet, HashSetExt};
|
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
engine::{Command, EngineState, StateWorkingSet},
|
engine::{Command, EngineState, StateWorkingSet},
|
||||||
Type,
|
Type,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub fn test_examples(cmd: impl Command + 'static) {
|
pub fn test_examples(cmd: impl Command + 'static) {
|
||||||
let examples = cmd.examples();
|
let examples = cmd.examples();
|
||||||
|
|
|
@ -21,7 +21,6 @@ nu-ansi-term = "0.47.0"
|
||||||
fancy-regex = "0.11"
|
fancy-regex = "0.11"
|
||||||
itertools = "0.10"
|
itertools = "0.10"
|
||||||
shadow-rs = { version = "0.22", default-features = false }
|
shadow-rs = { version = "0.22", default-features = false }
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
shadow-rs = { version = "0.22", default-features = false }
|
shadow-rs = { version = "0.22", default-features = false }
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
use ahash::{HashSet, HashSetExt};
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
ast::Block,
|
ast::Block,
|
||||||
engine::{EngineState, Stack, StateDelta, StateWorkingSet},
|
engine::{EngineState, Stack, StateDelta, StateWorkingSet},
|
||||||
Example, PipelineData, Signature, Span, Type, Value,
|
Example, PipelineData, Signature, Span, Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub fn check_example_input_and_output_types_match_command_signature(
|
pub fn check_example_input_and_output_types_match_command_signature(
|
||||||
example: &Example,
|
example: &Example,
|
||||||
|
|
|
@ -16,11 +16,11 @@ mod test_examples {
|
||||||
use crate::{
|
use crate::{
|
||||||
Break, Collect, Def, Describe, Echo, ExportCommand, ExportDef, If, Let, Module, Mut, Use,
|
Break, Collect, Def, Describe, Echo, ExportCommand, ExportDef, If, Let, Module, Mut, Use,
|
||||||
};
|
};
|
||||||
use ahash::{HashSet, HashSetExt};
|
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
engine::{Command, EngineState, StateWorkingSet},
|
engine::{Command, EngineState, StateWorkingSet},
|
||||||
Type, Value,
|
Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub fn test_examples(cmd: impl Command + 'static) {
|
pub fn test_examples(cmd: impl Command + 'static) {
|
||||||
let examples = cmd.examples();
|
let examples = cmd.examples();
|
||||||
|
|
|
@ -18,7 +18,6 @@ nu-engine = { path = "../nu-engine", version = "0.81.1" }
|
||||||
nu-json = { path="../nu-json", version = "0.81.1" }
|
nu-json = { path="../nu-json", version = "0.81.1" }
|
||||||
|
|
||||||
serde = { version="1.0", features=["derive"] }
|
serde = { version="1.0", features=["derive"] }
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
nu-test-support = { path="../nu-test-support", version = "0.81.1" }
|
nu-test-support = { path="../nu-test-support", version = "0.81.1" }
|
||||||
|
|
|
@ -2,9 +2,9 @@ use crate::{
|
||||||
nu_style::{color_from_hex, lookup_style},
|
nu_style::{color_from_hex, lookup_style},
|
||||||
parse_nustyle, NuStyle,
|
parse_nustyle, NuStyle,
|
||||||
};
|
};
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_ansi_term::Style;
|
use nu_ansi_term::Style;
|
||||||
use nu_protocol::Value;
|
use nu_protocol::Value;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub fn lookup_ansi_color_style(s: &str) -> Style {
|
pub fn lookup_ansi_color_style(s: &str) -> Style {
|
||||||
if s.starts_with('#') {
|
if s.starts_with('#') {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
use crate::text_style::Alignment;
|
use crate::text_style::Alignment;
|
||||||
use crate::{color_record_to_nustyle, lookup_ansi_color_style, TextStyle};
|
use crate::{color_record_to_nustyle, lookup_ansi_color_style, TextStyle};
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_ansi_term::{Color, Style};
|
use nu_ansi_term::{Color, Style};
|
||||||
use nu_engine::{env::get_config, eval_block};
|
use nu_engine::{env::get_config, eval_block};
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
engine::{EngineState, Stack, StateWorkingSet},
|
engine::{EngineState, Stack, StateWorkingSet},
|
||||||
CliError, IntoPipelineData, Value,
|
CliError, IntoPipelineData, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use std::fmt::{Debug, Formatter, Result};
|
use std::fmt::{Debug, Formatter, Result};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ nu-utils = { path = "../nu-utils", version = "0.81.1" }
|
||||||
nu-ansi-term = "0.47.0"
|
nu-ansi-term = "0.47.0"
|
||||||
|
|
||||||
alphanumeric-sort = "1.5"
|
alphanumeric-sort = "1.5"
|
||||||
ahash = "0.8.3"
|
|
||||||
atty = "0.2"
|
atty = "0.2"
|
||||||
base64 = "0.21"
|
base64 = "0.21"
|
||||||
byteorder = "1.4"
|
byteorder = "1.4"
|
||||||
|
|
|
@ -159,8 +159,8 @@ impl PartialEq for HashableValue {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
|
||||||
use nu_protocol::ast::{CellPath, PathMember};
|
use nu_protocol::ast::{CellPath, PathMember};
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn from_value() {
|
fn from_value() {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use super::hashable_value::HashableValue;
|
use super::hashable_value::HashableValue;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::ast::Call;
|
use nu_protocol::ast::Call;
|
||||||
|
@ -8,6 +7,7 @@ use nu_protocol::{
|
||||||
Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape,
|
Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, Spanned, SyntaxShape,
|
||||||
Type, Value,
|
Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
/// Return map of <deprecated_command_name, new_command_name>
|
/// Return map of <deprecated_command_name, new_command_name>
|
||||||
/// This covers simple deprecated commands nicely, but it's not great for deprecating
|
/// This covers simple deprecated commands nicely, but it's not great for deprecating
|
||||||
|
|
2
crates/nu-command/src/env/config/utils.rs
vendored
2
crates/nu-command/src/env/config/utils.rs
vendored
|
@ -1,4 +1,4 @@
|
||||||
use ahash::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
|
|
2
crates/nu-command/src/env/with_env.rs
vendored
2
crates/nu-command/src/env/with_env.rs
vendored
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use nu_engine::{eval_block, CallExt};
|
use nu_engine::{eval_block, CallExt};
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
|
|
|
@ -14,7 +14,6 @@ mod test_examples {
|
||||||
SplitRow, Str, StrJoin, StrLength, StrReplace, Update, Url, Values, Wrap,
|
SplitRow, Str, StrJoin, StrLength, StrReplace, Update, Url, Values, Wrap,
|
||||||
};
|
};
|
||||||
use crate::{Each, To};
|
use crate::{Each, To};
|
||||||
use ahash::{HashSet, HashSetExt};
|
|
||||||
use nu_cmd_lang::example_support::{
|
use nu_cmd_lang::example_support::{
|
||||||
check_all_signature_input_output_types_entries_have_examples,
|
check_all_signature_input_output_types_entries_have_examples,
|
||||||
check_example_evaluates_to_expected_output,
|
check_example_evaluates_to_expected_output,
|
||||||
|
@ -25,6 +24,7 @@ mod test_examples {
|
||||||
engine::{Command, EngineState, StateWorkingSet},
|
engine::{Command, EngineState, StateWorkingSet},
|
||||||
Type,
|
Type,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub fn test_examples(cmd: impl Command + 'static) {
|
pub fn test_examples(cmd: impl Command + 'static) {
|
||||||
let examples = cmd.examples();
|
let examples = cmd.examples();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
#[cfg(all(
|
#[cfg(all(
|
||||||
feature = "trash-support",
|
feature = "trash-support",
|
||||||
not(target_os = "android"),
|
not(target_os = "android"),
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::ast::Call;
|
use nu_protocol::ast::Call;
|
||||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||||
|
@ -6,6 +5,7 @@ use nu_protocol::{
|
||||||
Config, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
Config, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Join;
|
pub struct Join;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use ahash::{HashSet, HashSetExt};
|
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::ast::{Call, CellPath, PathMember};
|
use nu_protocol::ast::{Call, CellPath, PathMember};
|
||||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||||
|
@ -6,6 +5,7 @@ use nu_protocol::{
|
||||||
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData,
|
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData,
|
||||||
PipelineIterator, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
PipelineIterator, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Select;
|
pub struct Select;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::formats::value_to_string;
|
use crate::formats::value_to_string;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use nu_protocol::ast::Call;
|
use nu_protocol::ast::Call;
|
||||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||||
|
@ -8,6 +7,7 @@ use nu_protocol::{
|
||||||
Span, Type, Value,
|
Span, Type, Value,
|
||||||
};
|
};
|
||||||
use std::collections::hash_map::IntoIter;
|
use std::collections::hash_map::IntoIter;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Uniq;
|
pub struct Uniq;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use ahash::HashSet;
|
|
||||||
use nu_engine::{eval_block, CallExt};
|
use nu_engine::{eval_block, CallExt};
|
||||||
use nu_protocol::ast::{Block, Call};
|
use nu_protocol::ast::{Block, Call};
|
||||||
use nu_protocol::engine::{Closure, Command, EngineState, Stack};
|
use nu_protocol::engine::{Closure, Command, EngineState, Stack};
|
||||||
|
@ -6,6 +5,7 @@ use nu_protocol::{
|
||||||
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData,
|
Category, Example, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData,
|
||||||
PipelineIterator, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
PipelineIterator, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashSet;
|
||||||
use std::iter::FromIterator;
|
use std::iter::FromIterator;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::formats::to::delimited::merge_descriptors;
|
use crate::formats::to::delimited::merge_descriptors;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use fancy_regex::Regex;
|
use fancy_regex::Regex;
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::ast::Call;
|
use nu_protocol::ast::Call;
|
||||||
|
@ -10,6 +9,7 @@ use nu_protocol::{
|
||||||
};
|
};
|
||||||
use rust_embed::RustEmbed;
|
use rust_embed::RustEmbed;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::math::utils::run_with_function;
|
use crate::math::utils::run_with_function;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_protocol::ast::Call;
|
use nu_protocol::ast::Call;
|
||||||
use nu_protocol::engine::{Command, EngineState, Stack};
|
use nu_protocol::engine::{Command, EngineState, Stack};
|
||||||
use nu_protocol::{Category, Example, PipelineData, ShellError, Signature, Span, Type, Value};
|
use nu_protocol::{Category, Example, PipelineData, ShellError, Signature, Span, Type, Value};
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct SubCommand;
|
pub struct SubCommand;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use nu_protocol::{
|
||||||
};
|
};
|
||||||
use ureq::{Error, ErrorKind, Request, Response};
|
use ureq::{Error, ErrorKind, Request, Response};
|
||||||
|
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_ansi_term::*;
|
use nu_ansi_term::*;
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::engine::{EngineState, Stack};
|
use nu_protocol::engine::{EngineState, Stack};
|
||||||
|
@ -7,6 +6,7 @@ use nu_protocol::{
|
||||||
PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct AnsiCommand;
|
pub struct AnsiCommand;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::hook::eval_hook;
|
use crate::hook::eval_hook;
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_engine::env_to_strings;
|
use nu_engine::env_to_strings;
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
|
@ -12,6 +11,7 @@ use nu_protocol::{
|
||||||
use nu_system::ForegroundProcess;
|
use nu_system::ForegroundProcess;
|
||||||
use os_pipe::PipeReader;
|
use os_pipe::PipeReader;
|
||||||
use pathdiff::diff_paths;
|
use pathdiff::diff_paths;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::io::{BufRead, BufReader, Read, Write};
|
use std::io::{BufRead, BufReader, Read, Write};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::{Command as CommandSys, Stdio};
|
use std::process::{Command as CommandSys, Stdio};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_protocol::{ShellError, Span};
|
use nu_protocol::{ShellError, Span};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
// Attribution: Thanks exa. Most of this file is taken from around here
|
// Attribution: Thanks exa. Most of this file is taken from around here
|
||||||
|
|
|
@ -17,7 +17,6 @@ nu-glob = { path = "../nu-glob", version = "0.81.1" }
|
||||||
nu-utils = { path = "../nu-utils", version = "0.81.1" }
|
nu-utils = { path = "../nu-utils", version = "0.81.1" }
|
||||||
|
|
||||||
sysinfo ="0.29"
|
sysinfo ="0.29"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = []
|
plugin = []
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use ahash::HashSet;
|
|
||||||
use nu_protocol::Value;
|
use nu_protocol::Value;
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
pub fn get_columns(input: &[Value]) -> Vec<String> {
|
pub fn get_columns(input: &[Value]) -> Vec<String> {
|
||||||
let mut columns = vec![];
|
let mut columns = vec![];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use nu_protocol::ast::{Call, Expr, PathMember};
|
use nu_protocol::ast::{Call, Expr, PathMember};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::{current_dir_str, get_full_help, nu_variable::NuVariable};
|
use crate::{current_dir_str, get_full_help, nu_variable::NuVariable};
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_path::expand_path_with;
|
use nu_path::expand_path_with;
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
ast::{
|
ast::{
|
||||||
|
@ -10,6 +9,7 @@ use nu_protocol::{
|
||||||
DataSource, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, PipelineMetadata,
|
DataSource, IntoInterruptiblePipelineData, IntoPipelineData, PipelineData, PipelineMetadata,
|
||||||
Range, ShellError, Span, Spanned, Unit, Value, VarId, ENV_VARIABLE_ID,
|
Range, ShellError, Span, Spanned, Unit, Value, VarId, ENV_VARIABLE_ID,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
pub fn eval_operator(op: &Expression) -> Result<Operator, ShellError> {
|
pub fn eval_operator(op: &Expression) -> Result<Operator, ShellError> {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
engine::{Command, EngineState, Stack, Visibility},
|
engine::{Command, EngineState, Stack, Visibility},
|
||||||
ShellError, Signature, Span, SyntaxShape, Type, Value,
|
ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub fn create_scope(
|
pub fn create_scope(
|
||||||
engine_state: &EngineState,
|
engine_state: &EngineState,
|
||||||
|
|
|
@ -25,5 +25,4 @@ strip-ansi-escapes = "0.1"
|
||||||
crossterm = "0.26"
|
crossterm = "0.26"
|
||||||
ratatui = "0.20"
|
ratatui = "0.20"
|
||||||
ansi-str = "0.7"
|
ansi-str = "0.7"
|
||||||
ahash = "0.8.3"
|
|
||||||
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] }
|
lscolors = { version = "0.14", default-features = false, features = ["nu-ansi-term"] }
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_protocol::{
|
use nu_protocol::{
|
||||||
engine::{EngineState, Stack},
|
engine::{EngineState, Stack},
|
||||||
Value,
|
Value,
|
||||||
};
|
};
|
||||||
use ratatui::layout::Rect;
|
use ratatui::layout::Rect;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::io::Result;
|
use std::io::Result;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
use std::io::{self, Result};
|
use std::io::{self, Result};
|
||||||
|
|
||||||
use crossterm::event::KeyEvent;
|
use crossterm::event::KeyEvent;
|
||||||
|
|
|
@ -3,7 +3,6 @@ use crate::{
|
||||||
util::{create_lscolors, create_map, map_into_value},
|
util::{create_lscolors, create_map, map_into_value},
|
||||||
PagerConfig, StyleConfig,
|
PagerConfig, StyleConfig,
|
||||||
};
|
};
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_ansi_term::{Color, Style};
|
use nu_ansi_term::{Color, Style};
|
||||||
use nu_color_config::{get_color_map, StyleComputer};
|
use nu_color_config::{get_color_map, StyleComputer};
|
||||||
use nu_engine::CallExt;
|
use nu_engine::CallExt;
|
||||||
|
@ -12,6 +11,7 @@ use nu_protocol::{
|
||||||
engine::{Command, EngineState, Stack},
|
engine::{Command, EngineState, Stack},
|
||||||
Category, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
Category, Example, PipelineData, ShellError, Signature, Span, SyntaxShape, Type, Value,
|
||||||
};
|
};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
/// A `less` like program to render a [Value] as a table.
|
/// A `less` like program to render a [Value] as a table.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use nu_engine::get_columns;
|
use nu_engine::get_columns;
|
||||||
use nu_protocol::{ast::PathMember, ListStream, PipelineData, PipelineMetadata, RawStream, Value};
|
use nu_protocol::{ast::PathMember, ListStream, PipelineData, PipelineMetadata, RawStream, Value};
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::{
|
||||||
sync::atomic::Ordering,
|
sync::atomic::Ordering,
|
||||||
};
|
};
|
||||||
|
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crossterm::{
|
use crossterm::{
|
||||||
event::{KeyCode, KeyEvent, KeyModifiers},
|
event::{KeyCode, KeyEvent, KeyModifiers},
|
||||||
|
|
|
@ -4,8 +4,8 @@ use crate::{
|
||||||
commands::{SimpleCommand, ViewCommand},
|
commands::{SimpleCommand, ViewCommand},
|
||||||
views::View,
|
views::View,
|
||||||
};
|
};
|
||||||
use ahash::HashMap;
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub use command::Command;
|
pub use command::Command;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ mod tablew;
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crossterm::event::{KeyCode, KeyEvent};
|
use crossterm::event::{KeyCode, KeyEvent};
|
||||||
use nu_color_config::{get_color_map, StyleComputer};
|
use nu_color_config::{get_color_map, StyleComputer};
|
||||||
|
|
|
@ -21,7 +21,6 @@ chrono = { default-features = false, features = ['std'], version = "0.4" }
|
||||||
itertools = "0.10"
|
itertools = "0.10"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rstest = { version = "0.17", default-features = false }
|
rstest = { version = "0.17", default-features = false }
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use crate::parser_path::ParserPath;
|
use crate::parser_path::ParserPath;
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use log::trace;
|
use log::trace;
|
||||||
use nu_path::canonicalize_with;
|
use nu_path::canonicalize_with;
|
||||||
|
@ -12,6 +11,7 @@ use nu_protocol::{
|
||||||
span, Alias, BlockId, Exportable, Module, ModuleId, ParseError, PositionalArg,
|
span, Alias, BlockId, Exportable, Module, ModuleId, ParseError, PositionalArg,
|
||||||
ResolvedImportPattern, Span, Spanned, SyntaxShape, Type, VarId,
|
ResolvedImportPattern, Span, Spanned, SyntaxShape, Type, VarId,
|
||||||
};
|
};
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@ use crate::parse_keywords::{
|
||||||
parse_use, parse_where, parse_where_expr, LIB_DIRS_VAR,
|
parse_use, parse_where, parse_where_expr, LIB_DIRS_VAR,
|
||||||
};
|
};
|
||||||
|
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use log::trace;
|
use log::trace;
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::{num::ParseIntError, str};
|
use std::{num::ParseIntError, str};
|
||||||
|
|
||||||
#[cfg(feature = "plugin")]
|
#[cfg(feature = "plugin")]
|
||||||
|
|
|
@ -18,4 +18,3 @@ bincode = "1.3"
|
||||||
rmp-serde = "1.1"
|
rmp-serde = "1.1"
|
||||||
serde = { version = "1.0" }
|
serde = { version = "1.0" }
|
||||||
serde_json = { version = "1.0"}
|
serde_json = { version = "1.0"}
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
mod declaration;
|
mod declaration;
|
||||||
use ahash::HashMap;
|
|
||||||
pub use declaration::PluginDeclaration;
|
pub use declaration::PluginDeclaration;
|
||||||
use nu_engine::documentation::get_flags_section;
|
use nu_engine::documentation::get_flags_section;
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::protocol::{CallInput, LabeledError, PluginCall, PluginData, PluginResponse};
|
use crate::protocol::{CallInput, LabeledError, PluginCall, PluginData, PluginResponse};
|
||||||
use crate::EncodingType;
|
use crate::EncodingType;
|
||||||
|
|
|
@ -29,7 +29,6 @@ strum = "0.24"
|
||||||
strum_macros = "0.24"
|
strum_macros = "0.24"
|
||||||
thiserror = "1.0"
|
thiserror = "1.0"
|
||||||
typetag = "0.2"
|
typetag = "0.2"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
plugin = ["serde_json"]
|
plugin = ["serde_json"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{span, ModuleId, Span};
|
use crate::{span, ModuleId, Span};
|
||||||
use ahash::{HashSet, HashSetExt};
|
use std::collections::HashSet;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub enum ImportPatternMember {
|
pub enum ImportPatternMember {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{ShellError, Span, Value};
|
use crate::{ShellError, Span, Value};
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
const TRIM_STRATEGY_DEFAULT: TrimStrategy = TrimStrategy::Wrap {
|
const TRIM_STRATEGY_DEFAULT: TrimStrategy = TrimStrategy::Wrap {
|
||||||
try_to_keep_words: true,
|
try_to_keep_words: true,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{BlockId, Value, VarId};
|
use crate::{BlockId, Value, VarId};
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ use crate::{
|
||||||
Signature, Span, Type, VarId, Variable, VirtualPathId,
|
Signature, Span, Type, VarId, Variable, VirtualPathId,
|
||||||
};
|
};
|
||||||
use crate::{ParseError, Value};
|
use crate::{ParseError, Value};
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
|
||||||
use core::panic;
|
use core::panic;
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{DeclId, ModuleId, OverlayId, Type, Value, VarId};
|
use crate::{DeclId, ModuleId, OverlayId, Type, Value, VarId};
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
pub static DEFAULT_OVERLAY_NAME: &str = "zero";
|
pub static DEFAULT_OVERLAY_NAME: &str = "zero";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt, HashSet, HashSetExt};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
use crate::engine::EngineState;
|
use crate::engine::EngineState;
|
||||||
use crate::engine::DEFAULT_OVERLAY_NAME;
|
use crate::engine::DEFAULT_OVERLAY_NAME;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
use std::collections::HashMap;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::ast::{Math, Operator};
|
||||||
use crate::engine::EngineState;
|
use crate::engine::EngineState;
|
||||||
use crate::ShellError;
|
use crate::ShellError;
|
||||||
use crate::{did_you_mean, BlockId, Config, Span, Spanned, Type, VarId};
|
use crate::{did_you_mean, BlockId, Config, Span, Spanned, Type, VarId};
|
||||||
use ahash::HashMap;
|
|
||||||
use byte_unit::ByteUnit;
|
use byte_unit::ByteUnit;
|
||||||
use chrono::{DateTime, Duration, FixedOffset};
|
use chrono::{DateTime, Duration, FixedOffset};
|
||||||
use chrono_humanize::HumanTime;
|
use chrono_humanize::HumanTime;
|
||||||
|
@ -24,6 +23,7 @@ use nu_utils::get_system_locale;
|
||||||
use num_format::ToFormattedString;
|
use num_format::ToFormattedString;
|
||||||
pub use range::*;
|
pub use range::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
fmt::{Display, Formatter, Result as FmtResult},
|
fmt::{Display, Formatter, Result as FmtResult},
|
||||||
|
|
|
@ -31,5 +31,4 @@ mach2 = "0.4"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
ntapi = "0.4"
|
ntapi = "0.4"
|
||||||
once_cell = "1.17"
|
once_cell = "1.17"
|
||||||
ahash="0.8.3"
|
|
||||||
winapi = { version = "0.3", features = ["tlhelp32", "fileapi", "handleapi", "ifdef", "ioapiset", "minwindef", "pdh", "psapi", "synchapi", "sysinfoapi", "winbase", "winerror", "winioctl", "winnt", "oleauto", "wbemcli", "rpcdce", "combaseapi", "objidl", "powerbase", "netioapi", "lmcons", "lmaccess", "lmapibuf", "memoryapi", "shellapi", "std", "securitybaseapi"] }
|
winapi = { version = "0.3", features = ["tlhelp32", "fileapi", "handleapi", "ifdef", "ioapiset", "minwindef", "pdh", "psapi", "synchapi", "sysinfoapi", "winbase", "winerror", "winioctl", "winnt", "oleauto", "wbemcli", "rpcdce", "combaseapi", "objidl", "powerbase", "netioapi", "lmcons", "lmaccess", "lmapibuf", "memoryapi", "shellapi", "std", "securitybaseapi"] }
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// Attribution: a lot of this came from procs https://github.com/dalance/procs
|
// Attribution: a lot of this came from procs https://github.com/dalance/procs
|
||||||
// and sysinfo https://github.com/GuillaumeGomez/sysinfo
|
// and sysinfo https://github.com/GuillaumeGomez/sysinfo
|
||||||
|
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use chrono::offset::TimeZone;
|
use chrono::offset::TimeZone;
|
||||||
use chrono::{Local, NaiveDate};
|
use chrono::{Local, NaiveDate};
|
||||||
use libc::c_void;
|
use libc::c_void;
|
||||||
|
@ -14,6 +13,7 @@ use ntapi::ntrtl::{RtlGetVersion, PRTL_USER_PROCESS_PARAMETERS, RTL_USER_PROCESS
|
||||||
use ntapi::ntwow64::{PEB32, PRTL_USER_PROCESS_PARAMETERS32, RTL_USER_PROCESS_PARAMETERS32};
|
use ntapi::ntwow64::{PEB32, PRTL_USER_PROCESS_PARAMETERS32, RTL_USER_PROCESS_PARAMETERS32};
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::mem::{size_of, zeroed, MaybeUninit};
|
use std::mem::{size_of, zeroed, MaybeUninit};
|
||||||
use std::os::windows::ffi::OsStringExt;
|
use std::os::windows::ffi::OsStringExt;
|
||||||
|
|
|
@ -17,7 +17,6 @@ nu-engine = { path = "../nu-engine", version = "0.81.1" }
|
||||||
nu-color-config = { path = "../nu-color-config", version = "0.81.1" }
|
nu-color-config = { path = "../nu-color-config", version = "0.81.1" }
|
||||||
nu-ansi-term = "0.47.0"
|
nu-ansi-term = "0.47.0"
|
||||||
tabled = { version = "0.12.2", features = ["color"], default-features = false }
|
tabled = { version = "0.12.2", features = ["color"], default-features = false }
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
# nu-test-support = { path="../nu-test-support", version = "0.81.1" }
|
# nu-test-support = { path="../nu-test-support", version = "0.81.1" }
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
use crate::table_theme::TableTheme;
|
use crate::table_theme::TableTheme;
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_ansi_term::Style;
|
use nu_ansi_term::Style;
|
||||||
use nu_color_config::TextStyle;
|
use nu_color_config::TextStyle;
|
||||||
use nu_protocol::TrimStrategy;
|
use nu_protocol::TrimStrategy;
|
||||||
use std::cmp::min;
|
use std::cmp::min;
|
||||||
|
use std::collections::HashMap;
|
||||||
use tabled::{
|
use tabled::{
|
||||||
builder::Builder,
|
builder::Builder,
|
||||||
grid::{
|
grid::{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use nu_color_config::{Alignment, StyleComputer, TextStyle};
|
use nu_color_config::{Alignment, StyleComputer, TextStyle};
|
||||||
use nu_engine::column::get_columns;
|
use nu_engine::column::get_columns;
|
||||||
use nu_protocol::{ast::PathMember, Config, Span, TableIndexMode, Value};
|
use nu_protocol::{ast::PathMember, Config, Span, TableIndexMode, Value};
|
||||||
|
use std::collections::HashMap;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{cmp::max, sync::atomic::AtomicBool};
|
use std::{cmp::max, sync::atomic::AtomicBool};
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@ mod collapse;
|
||||||
mod expanded;
|
mod expanded;
|
||||||
mod general;
|
mod general;
|
||||||
|
|
||||||
use ahash::HashMap;
|
|
||||||
use nu_color_config::{Alignment, StyleComputer, TextStyle};
|
use nu_color_config::{Alignment, StyleComputer, TextStyle};
|
||||||
use nu_protocol::TrimStrategy;
|
use nu_protocol::TrimStrategy;
|
||||||
use nu_protocol::{Config, FooterMode, ShellError, Span, Value};
|
use nu_protocol::{Config, FooterMode, ShellError, Span, Value};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{string_wrap, NuTable, TableConfig, TableTheme};
|
use crate::{string_wrap, NuTable, TableConfig, TableTheme};
|
||||||
|
|
||||||
|
|
|
@ -25,4 +25,3 @@ gjson = "0.8"
|
||||||
scraper = { default-features = false, version = "0.16" }
|
scraper = { default-features = false, version = "0.16" }
|
||||||
sxd-document = "0.3"
|
sxd-document = "0.3"
|
||||||
sxd-xpath = "0.4"
|
sxd-xpath = "0.4"
|
||||||
ahash = "0.8.3"
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::query_web::css;
|
use crate::query_web::css;
|
||||||
use ahash::{HashMap, HashMapExt};
|
|
||||||
use scraper::{element_ref::ElementRef, Html, Selector as ScraperSelector};
|
use scraper::{element_ref::ElementRef, Html, Selector as ScraperSelector};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub type Headers = HashMap<String, usize>;
|
pub type Headers = HashMap<String, usize>;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue