Skip to content

Commit c975d35

Browse files
committed
Shuffle usings to silence warnings
1 parent e08d4a1 commit c975d35

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/rustup-utils/src/raw.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use std::fs;
77
use std::io::Write;
88
use std::io;
99
use std::path::Path;
10-
use std::ptr;
11-
use std::process::{Command, Stdio, ExitStatus};
10+
use std::process::{Command, ExitStatus};
1211
use std::str;
1312

1413
use rand::random;
@@ -353,6 +352,8 @@ pub fn find_cmd<'a>(cmds: &[&'a str]) -> Option<&'a str> {
353352
pub fn open_browser(path: &Path) -> io::Result<bool> {
354353
#[cfg(not(windows))]
355354
fn inner(path: &Path) -> io::Result<bool> {
355+
use std::process::Stdio;
356+
356357
let commands = ["xdg-open", "open", "firefox", "chromium", "sensible-browser"];
357358
if let Some(cmd) = find_cmd(&commands) {
358359
Command::new(cmd)
@@ -369,6 +370,8 @@ pub fn open_browser(path: &Path) -> io::Result<bool> {
369370
#[cfg(windows)]
370371
fn inner(path: &Path) -> io::Result<bool> {
371372
use winapi;
373+
use std::ptr;
374+
372375
extern "system" {
373376
pub fn ShellExecuteW(hwnd: winapi::HWND,
374377
lpOperation: winapi::LPCWSTR,
@@ -379,7 +382,7 @@ pub fn open_browser(path: &Path) -> io::Result<bool> {
379382
-> winapi::HINSTANCE;
380383
}
381384
const SW_SHOW: winapi::c_int = 5;
382-
385+
383386
let path = windows::to_u16s(path)?;
384387
let operation = windows::to_u16s("open")?;
385388
let result = unsafe {

0 commit comments

Comments
 (0)