Fix warnings for Rust 1.51 (#3214)

* Fix warnings for Rust 1.51

* More fixes

* More fixes
This commit is contained in:
Jonathan Turner
2021-03-26 21:26:57 +13:00
committed by GitHub
parent 589fc0b8ad
commit 7e184b58b2
55 changed files with 325 additions and 400 deletions

View File

@ -1,4 +1,4 @@
mod nu;
mod to_bson;
pub use to_bson::ToBSON;
pub use to_bson::ToBson;

View File

@ -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())
}

View File

@ -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")

View File

@ -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![] }
}
}