Rust 1.85, edition=2024 (#15741)

This commit is contained in:
Jack Wright
2025-05-13 07:49:30 -07:00
committed by GitHub
parent 1a0986903f
commit c2ac8f730e
793 changed files with 4276 additions and 3687 deletions

View File

@ -2,7 +2,7 @@
authors = ["The Nushell Project Developers"]
description = "Shared internal functionality to support Nushell plugins"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core"
edition = "2021"
edition = "2024"
license = "MIT"
name = "nu-plugin-core"
version = "0.104.1"
@ -28,4 +28,4 @@ default = ["local-socket"]
local-socket = ["interprocess", "nu-plugin-protocol/local-socket"]
[target.'cfg(target_os = "windows")'.dependencies]
windows = { workspace = true }
windows = { workspace = true }

View File

@ -2,8 +2,8 @@ use std::ffi::OsStr;
use std::io::{Stdin, Stdout};
use std::process::{Child, ChildStdin, ChildStdout, Command, Stdio};
use nu_protocol::shell_error::io::IoError;
use nu_protocol::ShellError;
use nu_protocol::shell_error::io::IoError;
#[cfg(feature = "local-socket")]
mod local_socket;

View File

@ -2,8 +2,8 @@
use nu_plugin_protocol::{ByteStreamInfo, ListStreamInfo, PipelineDataHeader, StreamMessage};
use nu_protocol::{
engine::Sequence, shell_error::io::IoError, ByteStream, ListStream, PipelineData, Reader,
ShellError, Signals,
ByteStream, ListStream, PipelineData, Reader, ShellError, Signals, engine::Sequence,
shell_error::io::IoError,
};
use std::{
io::{Read, Write},

View File

@ -1,10 +1,10 @@
use nu_plugin_protocol::{StreamData, StreamId, StreamMessage};
use nu_protocol::{ShellError, Span, Value};
use std::{
collections::{btree_map, BTreeMap},
collections::{BTreeMap, btree_map},
iter::FusedIterator,
marker::PhantomData,
sync::{mpsc, Arc, Condvar, Mutex, MutexGuard, Weak},
sync::{Arc, Condvar, Mutex, MutexGuard, Weak, mpsc},
};
#[cfg(test)]

View File

@ -1,7 +1,8 @@
use std::{
sync::{
Arc,
atomic::{AtomicBool, Ordering::Relaxed},
mpsc, Arc,
mpsc,
},
time::{Duration, Instant},
};

View File

@ -1,15 +1,15 @@
use super::{
Interface, InterfaceManager, PluginRead, PluginWrite,
stream::{StreamManager, StreamManagerHandle},
test_util::TestCase,
Interface, InterfaceManager, PluginRead, PluginWrite,
};
use nu_plugin_protocol::{
ByteStreamInfo, ListStreamInfo, PipelineDataHeader, PluginInput, PluginOutput, StreamData,
StreamMessage,
};
use nu_protocol::{
engine::Sequence, shell_error::io::IoError, ByteStream, ByteStreamSource, ByteStreamType,
DataSource, ListStream, PipelineData, PipelineMetadata, ShellError, Signals, Span, Value,
ByteStream, ByteStreamSource, ByteStreamType, DataSource, ListStream, PipelineData,
PipelineMetadata, ShellError, Signals, Span, Value, engine::Sequence, shell_error::io::IoError,
};
use std::{path::Path, sync::Arc};

View File

@ -13,11 +13,11 @@ pub use communication_mode::{
ClientCommunicationIo, CommunicationMode, PreparedServerCommunication, ServerCommunicationIo,
};
pub use interface::{
stream::{FromShellError, StreamManager, StreamManagerHandle, StreamReader, StreamWriter},
Interface, InterfaceManager, PipelineDataWriter, PluginRead, PluginWrite,
stream::{FromShellError, StreamManager, StreamManagerHandle, StreamReader, StreamWriter},
};
pub use serializers::{
json::JsonSerializer, msgpack::MsgPackSerializer, Encoder, EncodingType, PluginEncoder,
Encoder, EncodingType, PluginEncoder, json::JsonSerializer, msgpack::MsgPackSerializer,
};
#[doc(hidden)]

View File

@ -1,5 +1,5 @@
use nu_plugin_protocol::{PluginInput, PluginOutput};
use nu_protocol::{location, shell_error::io::IoError, ShellError};
use nu_protocol::{ShellError, location, shell_error::io::IoError};
use serde::Deserialize;
use crate::{Encoder, PluginEncoder};

View File

@ -1,7 +1,7 @@
use std::io::ErrorKind;
use nu_plugin_protocol::{PluginInput, PluginOutput};
use nu_protocol::{shell_error::io::IoError, ShellError};
use nu_protocol::{ShellError, shell_error::io::IoError};
use serde::Deserialize;
use crate::{Encoder, PluginEncoder};

View File

@ -1,6 +1,6 @@
use std::sync::{
atomic::{AtomicBool, Ordering},
Arc, Condvar, Mutex, MutexGuard, PoisonError,
atomic::{AtomicBool, Ordering},
};
use nu_protocol::ShellError;