mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:35:56 +02:00
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51 * More fixes * More fixes
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
mod nu;
|
||||
mod to_bson;
|
||||
|
||||
pub use to_bson::ToBSON;
|
||||
pub use to_bson::ToBson;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_plugin::serve_plugin;
|
||||
use nu_plugin_to_bson::ToBSON;
|
||||
use nu_plugin_to_bson::ToBson;
|
||||
|
||||
fn main() {
|
||||
serve_plugin(&mut ToBSON::new())
|
||||
serve_plugin(&mut ToBson::new())
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use crate::ToBSON;
|
||||
use crate::ToBson;
|
||||
use nu_errors::ShellError;
|
||||
use nu_plugin::Plugin;
|
||||
use nu_protocol::{ReturnValue, Signature, Value};
|
||||
use nu_source::Tag;
|
||||
|
||||
impl Plugin for ToBSON {
|
||||
impl Plugin for ToBson {
|
||||
fn config(&mut self) -> Result<Signature, ShellError> {
|
||||
Ok(Signature::build("to bson")
|
||||
.desc("Convert table into .bson binary")
|
||||
|
@ -9,13 +9,13 @@ use num_traits::ToPrimitive;
|
||||
use std::convert::TryInto;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ToBSON {
|
||||
pub struct ToBson {
|
||||
pub state: Vec<Value>,
|
||||
}
|
||||
|
||||
impl ToBSON {
|
||||
pub fn new() -> ToBSON {
|
||||
ToBSON { state: vec![] }
|
||||
impl ToBson {
|
||||
pub fn new() -> ToBson {
|
||||
ToBson { state: vec![] }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user