Skip to content

Commit 3567f07

Browse files
committed
<feat>:append the last commit
1 parent 2deccd2 commit 3567f07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gui/usbipd_gui.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ impl UsbipdGui {
171171
.clone()
172172
.unwrap_or_else(|| "Unknown Device".to_string()),
173173
);
174+
// if len > 32, truncate and add bus id
175+
if description.len() > 32 { // @todo use settings replace magic number
174176
description.truncate(32);
175-
if device.is_bound() {
176-
let menu_item;
177-
if description.len() == 32 {
178177
let bus_id = device
179178
.bus_id
180179
.clone()
181180
.unwrap_or_else(|| "Unknown Bus".to_string());
182181
description.push_str(&format!("..(Bus:{})", bus_id));
183182
}
184-
menu_item = self
183+
if device.is_bound() {
184+
let menu_item = self
185185
.new_menu_item(menu_tray.handle, &description, false, device.is_attached())
186186
.unwrap();
187187

0 commit comments

Comments
 (0)