mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:45:04 +02:00
update some dependencies (#6009)
* update some dependencies * there may be some bugs here but it seems to compile and run * clippy
This commit is contained in:
@ -6,7 +6,7 @@ use nu_protocol::{
|
||||
Category, Example, IntoInterruptiblePipelineData, PipelineData, ShellError, Signature, Spanned,
|
||||
SyntaxShape, Value,
|
||||
};
|
||||
use wax::Glob as WaxGlob;
|
||||
use wax::{Glob as WaxGlob, WalkBehavior};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Glob;
|
||||
@ -120,7 +120,13 @@ impl Command for Glob {
|
||||
|
||||
#[allow(clippy::needless_collect)]
|
||||
let glob_results: Vec<Value> = glob
|
||||
.walk(path, folder_depth)
|
||||
.walk_with_behavior(
|
||||
path,
|
||||
WalkBehavior {
|
||||
depth: folder_depth,
|
||||
..Default::default()
|
||||
},
|
||||
)
|
||||
.flatten()
|
||||
.map(|entry| Value::String {
|
||||
val: entry.into_path().to_string_lossy().to_string(),
|
||||
|
@ -40,7 +40,7 @@ impl Command for SubCommand {
|
||||
|
||||
fn uuid(call: &Call) -> Result<PipelineData, ShellError> {
|
||||
let span = call.head;
|
||||
let uuid_4 = Uuid::new_v4().to_hyphenated().to_string();
|
||||
let uuid_4 = Uuid::new_v4().hyphenated().to_string();
|
||||
|
||||
Ok(PipelineData::Value(
|
||||
Value::String { val: uuid_4, span },
|
||||
|
@ -6,7 +6,7 @@ use nu_protocol::{
|
||||
Category, Example, IntoPipelineData, PipelineData, ShellError, Signature, Span, Value,
|
||||
};
|
||||
use std::time::{Duration, UNIX_EPOCH};
|
||||
use sysinfo::{ComponentExt, DiskExt, NetworkExt, ProcessorExt, System, SystemExt, UserExt};
|
||||
use sysinfo::{ComponentExt, CpuExt, DiskExt, NetworkExt, System, SystemExt, UserExt};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Sys;
|
||||
@ -199,7 +199,7 @@ pub fn cpu(sys: &mut System, span: Span) -> Option<Value> {
|
||||
sys.refresh_cpu();
|
||||
|
||||
let mut output = vec![];
|
||||
for cpu in sys.processors() {
|
||||
for cpu in sys.cpus() {
|
||||
let mut cols = vec![];
|
||||
let mut vals = vec![];
|
||||
|
||||
|
Reference in New Issue
Block a user