We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24ba14d commit e5be9a5Copy full SHA for e5be9a5
1 file changed
src/networking/types/my_link_type.rs
@@ -50,10 +50,14 @@ impl MyLinkType {
50
| Self::LinuxSll2(l)
51
| Self::Unsupported(l) => {
52
format!(
53
- "{}: {} ({})",
+ "{}: {}{}",
54
link_type_translation(language),
55
l.get_name().unwrap_or_else(|_| l.0.to_string()),
56
- l.get_description().unwrap_or_else(|_| String::new())
+ if let Ok(desc) = l.get_description() {
57
+ format!(" ({desc})")
58
+ } else {
59
+ String::new()
60
+ }
61
)
62
}
63
Self::NotYetAssigned => {
0 commit comments