mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 23:44:52 +02:00
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51 * More fixes * More fixes
This commit is contained in:
@ -6,14 +6,14 @@ use nu_source::{SpannedItem, Tag};
|
||||
use std::str::FromStr;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct FromBSON {
|
||||
pub struct FromBson {
|
||||
pub state: Vec<u8>,
|
||||
pub name_tag: Tag,
|
||||
}
|
||||
|
||||
impl FromBSON {
|
||||
pub fn new() -> FromBSON {
|
||||
FromBSON {
|
||||
impl FromBson {
|
||||
pub fn new() -> FromBson {
|
||||
FromBson {
|
||||
state: vec![],
|
||||
name_tag: Tag::unknown(),
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
mod from_bson;
|
||||
mod nu;
|
||||
|
||||
pub use from_bson::FromBSON;
|
||||
pub use from_bson::FromBson;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_plugin::serve_plugin;
|
||||
use nu_plugin_from_bson::FromBSON;
|
||||
use nu_plugin_from_bson::FromBson;
|
||||
|
||||
fn main() {
|
||||
serve_plugin(&mut FromBSON::new())
|
||||
serve_plugin(&mut FromBson::new())
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use crate::FromBSON;
|
||||
use crate::FromBson;
|
||||
use nu_errors::ShellError;
|
||||
use nu_plugin::Plugin;
|
||||
use nu_protocol::{CallInfo, Primitive, ReturnValue, Signature, UntaggedValue, Value};
|
||||
use nu_source::Tag;
|
||||
|
||||
impl Plugin for FromBSON {
|
||||
impl Plugin for FromBson {
|
||||
fn config(&mut self) -> Result<Signature, ShellError> {
|
||||
Ok(Signature::build("from bson")
|
||||
.desc("Convert from .bson binary into table")
|
||||
|
Reference in New Issue
Block a user