Commit 08901dc1 authored by Eonm's avatar Eonm
Browse files

Update example with fmt::Display

parent cb4b8b16
//! Pretty print host interfaces.
use nl80211::Socket;
use nl80211::PrettyFormat;
fn main() -> Result<(), neli::err::NlError> {
let interfaces = Socket::connect()?.get_interfaces_info()?;
for interface in interfaces {
println!("{}\n", interface.pretty_format());
println!("{}\n", interface);
}
Ok(())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment