From 4fe9d8a0075decc12775732663eb9dd3b6a8a7b7 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 23 Jun 2021 21:04:09 +1200 Subject: [PATCH] Enable dataframe command by default (#3672) * Enable dataframe command by default * Fix unwrap --- Cargo.toml | 9 +-------- crates/nu-command/src/commands/dataframe/series/set.rs | 8 +++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 407e1ae6c9..9470cd431b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,7 @@ default = [ "fetch", "zip-support", "executable-support", + "dataframe", ] stable = ["default"] @@ -156,14 +157,6 @@ dataframe = [ "nu_plugin_to_bson/dataframe", ] - -[profile.release] -#strip = "symbols" #Couldn't get working +nightly -codegen-units = 1 #Reduce parallel codegen units -lto = true #Link Time Optimization -# opt-level = 'z' #Optimize for size -# debug = true - # Core plugins that ship with `cargo install nu` by default # Currently, Cargo limits us to installing only one binary # unless we use [[bin]], so we use this as a workaround diff --git a/crates/nu-command/src/commands/dataframe/series/set.rs b/crates/nu-command/src/commands/dataframe/series/set.rs index 6fa56249d0..f24b3ed3c3 100644 --- a/crates/nu-command/src/commands/dataframe/series/set.rs +++ b/crates/nu-command/src/commands/dataframe/series/set.rs @@ -98,7 +98,13 @@ fn command(mut args: CommandArgs) -> Result { })?; let res = chunked - .set(bool_mask, Some(val.to_f64().unwrap())) + .set( + bool_mask, + Some( + val.to_f64() + .expect("internal error: expected f64-compatible decimal"), + ), + ) .map_err(|e| parse_polars_error::<&str>(&e, &value.tag.span, None))?; Ok(OutputStream::one(NuSeries::series_to_value(