Skip to content

Commit

Permalink
Clippy fixes in X11 code
Browse files Browse the repository at this point in the history
  • Loading branch information
asahilina committed Oct 26, 2024
1 parent 4dd14fd commit 5cb8b1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/muvm/src/bin/muvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ fn main() -> Result<()> {

// Forward the native X11 display into the guest as a socket
if let Ok(x11_display) = env::var("DISPLAY") {
if let Some(x11_display) = x11_display.strip_prefix(":") {
if let Some(x11_display) = x11_display.strip_prefix(':') {
let socket_path = Path::new("/tmp/.X11-unix/").join(format!("X{}", x11_display));
if socket_path.exists() {
let socket_path = CString::new(
Expand Down
2 changes: 1 addition & 1 deletion crates/muvm/src/guest/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ where
Err(_) => return Ok(()),
};

if !host_display.starts_with(":") {
if !host_display.starts_with(':') {
return Err(anyhow!("Invalid host DISPLAY"));
}
let host_display = &host_display[1..];
Expand Down

0 comments on commit 5cb8b1d

Please sign in to comment.