Make the default int an i64 (#3428)

* Make the default int an i64

* fmt

* Fix random integer

* Treat pids as i64 for now
This commit is contained in:
JT
2021-05-14 20:35:09 +12:00
committed by GitHub
parent 440a589f9e
commit d79a3130b8
59 changed files with 693 additions and 284 deletions

View File

@ -23,7 +23,7 @@ pub async fn ps(tag: Tag, long: bool) -> Result<Vec<Value>, ShellError> {
for pid in result.into_iter() {
if let Some(result) = sys.get_process(pid) {
let mut dict = TaggedDictBuilder::new(&tag);
dict.insert_untagged("pid", UntaggedValue::int(pid));
dict.insert_untagged("pid", UntaggedValue::int(pid as i64));
dict.insert_untagged("name", UntaggedValue::string(result.name()));
dict.insert_untagged(
"status",
@ -41,7 +41,7 @@ pub async fn ps(tag: Tag, long: bool) -> Result<Vec<Value>, ShellError> {
if long {
if let Some(parent) = result.parent() {
dict.insert_untagged("parent", UntaggedValue::int(parent));
dict.insert_untagged("parent", UntaggedValue::int(parent as i64));
} else {
dict.insert_untagged("parent", UntaggedValue::nothing());
}