Files
nushell/crates/nu_plugin_polars/src/main.rs
Stefan Holderbach 9da0f41ebb Fix easy clippy lints from latest stable (#16053)
1.88.0 was released today, clippy now lints (machine-applicable)
against:
- format strings with empty braces that could be inlined
  - easy win
- `manual_abs_diff`
- returning of a stored result of the last expression.
  - this can be somewhat contentious but touched only a few places
2025-06-29 17:37:17 +02:00

22 lines
705 B
Rust

use nu_plugin::{MsgPackSerializer, serve_plugin};
use nu_plugin_polars::PolarsPlugin;
fn main() {
env_logger::init();
// Set config options via environment variable
unsafe {
// Extensions are required for certain things like aggregates with object dtypes to work
// correctly. It is disabled by default because of unsafe code.
// See https://docs.rs/polars/latest/polars/#user-guide for details
std::env::set_var("POLARS_ALLOW_EXTENSION", "true");
}
match PolarsPlugin::new() {
Ok(ref plugin) => serve_plugin(plugin, MsgPackSerializer {}),
Err(e) => {
eprintln!("{e}");
std::process::exit(1);
}
}
}