File: hostname.rs

package info (click to toggle)
rust-hostname 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 198 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
//! Naive re-implementation of the Linux `hostname` program.

use std::io;

fn main() -> io::Result<()> {
    let name = hostname::get()?;

    println!("{}", name.to_string_lossy());

    Ok(())
}