Skip to content

Non-primitive cast error #4

@scalarwaves

Description

@scalarwaves

While building:

error[E0605]: non-primitive cast: `sysinfo::linux::process::ProcessStatus` as `i64`
  --> src/object/process.rs:20:35
   |
20 |     dict.add("status", Value::int(proc.status() as i64));
   |                                   ^^^^^^^^^^^^^^^^^^^^
   |
   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait

error: aborting due to previous error

For more information about this error, try `rustc --explain E0605`.
error: Could not compile `nu`.

I'm running rustc 1.36.0-nightly (7158ed9cb 2019-05-15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions