move import inside cfg block

This commit is contained in:
Omer Ben-Amram 2019-12-15 17:03:39 +02:00
parent 498a7912e9
commit ebf302d261

View file

@ -22,7 +22,6 @@ use crate::{
main_loop::pending_requests::{CompletedRequest, LatestRequests},
LspError, Result,
};
use std::str::FromStr;
#[derive(Debug, Clone)]
pub struct Options {
@ -286,6 +285,8 @@ impl WorldSnapshot {
#[cfg(target_os = "windows")]
fn lowercase_drive_letter(url: &Url) -> Url {
use std::str::FromStr;
let s = url.to_string();
let drive_partition: Vec<&str> = s.rsplitn(2, ':').collect::<Vec<&str>>();