compute directory sizes from contained files and directories (#1250)

* compute directory sizes from contained files and directories

* De-lint

* Revert "De-lint"

This reverts commit 9df9fc07d777014fef8f5749a84b4e52e1ee652a.

* Revert "compute directory sizes from contained files and directories"

This reverts commit d43583e9aa20438bd613f78a36e641c9fd48cae3.

* Nu du command

* Nu du for you

* Add async support

* Lints

* so much bug fixing
This commit is contained in:
Corvus Corax
2020-01-25 20:43:29 -06:00
committed by Jonathan Turner
parent 35359cbc22
commit d48f99cb0e
5 changed files with 323 additions and 4 deletions

View File

@ -73,10 +73,9 @@ impl PrettyDebug for ReturnSuccess {
/// The core Result type for pipelines
pub type ReturnValue = Result<ReturnSuccess, ShellError>;
impl Into<ReturnValue> for Value {
/// Lift a Value into a ReturnValue
fn into(self) -> ReturnValue {
Ok(ReturnSuccess::Value(self))
impl From<Value> for ReturnValue {
fn from(v: Value) -> Self {
Ok(ReturnSuccess::Value(v))
}
}

View File

@ -368,3 +368,9 @@ impl From<String> for UntaggedValue {
UntaggedValue::Primitive(Primitive::String(input))
}
}
impl From<ShellError> for UntaggedValue {
fn from(e: ShellError) -> Self {
UntaggedValue::Error(e)
}
}