Skip to content

Commit 6139bc8

Browse files
authored
Merge pull request #803 from elenaf9/iface/fix-comment
iface: fix outdated docs on `Interface::new`
2 parents 6831e86 + 97afe68 commit 6139bc8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/iface/interface/mod.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -453,20 +453,13 @@ impl Interface {
453453
/// Create a network interface using the previously provided configuration.
454454
///
455455
/// # Panics
456-
/// If a required option is not provided, this function will panic. Required
457-
/// options are:
458-
///
459-
/// - [ethernet_addr]
460-
/// - [neighbor_cache]
461-
///
462-
/// [ethernet_addr]: #method.ethernet_addr
463-
/// [neighbor_cache]: #method.neighbor_cache
456+
/// This function panics if the [`Config::hardware_address`] does not match
457+
/// the medium of the device.
464458
pub fn new<D>(config: Config, device: &mut D, now: Instant) -> Self
465459
where
466460
D: Device + ?Sized,
467461
{
468462
let caps = device.capabilities();
469-
470463
assert_eq!(
471464
config.hardware_addr.medium(),
472465
caps.medium,

0 commit comments

Comments
 (0)