Skip to content

Add a wrapper around if_nameindex#1445

Merged
bors[bot] merged 1 commit intonix-rust:masterfrom
coolreader18:if_nameindex
Jun 6, 2021
Merged

Add a wrapper around if_nameindex#1445
bors[bot] merged 1 commit intonix-rust:masterfrom
coolreader18:if_nameindex

Conversation

@coolreader18
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! Don't forget to add a CHANGELOG entry.

Comment thread src/net/if_.rs Outdated
Comment thread src/net/if_.rs Outdated
@coolreader18 coolreader18 force-pushed the if_nameindex branch 2 times, most recently from 7f88c6c to 2a02f0b Compare June 6, 2021 15:35
Comment thread src/net/if_.rs Outdated
/// for iface in &interfaces {
/// println!("Interface #{} is called {}", iface.index(), iface.name().to_string_lossy());
/// }
/// # nix::Result::Ok(())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this works, but it would be in keeping with the style of the other doc tests if you return () here, and do an .unwrap() above instead of ?.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, alright, hadn't noticed that pattern.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, though note that the # means that line will be hidden from the docs; readers won't see that it returns Ok(())

Copy link
Copy Markdown
Member

@asomers asomers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

bors r+

@bors bors Bot merged commit 99fc58e into nix-rust:master Jun 6, 2021
@coolreader18 coolreader18 deleted the if_nameindex branch June 6, 2021 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants