Skip to content

error when compiling nsh using cargo install #46

@clemdemort

Description

@clemdemort
 Compiling nsh v0.4.2
error[E0061]: this function takes 0 arguments but 1 argument was supplied
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/nsh-0.4.2/src/prompt.rs:131:25
     |
131  |     let hostname_cstr = unistd::gethostname(&mut hostname_buf).expect("failed to get hostname");
     |                         ^^^^^^^^^^^^^^^^^^^ ----------------- argument of type `&mut [u8; 128]` unexpected
     |
note: function defined here
    --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.26.1/src/unistd.rs:1020:8
     |
1020 | pub fn gethostname() -> Result<OsString> {
     |        ^^^^^^^^^^^
help: remove the extra argument
     |
131  |     let hostname_cstr = unistd::gethostname().expect("failed to get hostname");
     |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions