From ebf302d2610527c35b8fb794a03cc1c280c8a9d3 Mon Sep 17 00:00:00 2001 From: Omer Ben-Amram Date: Sun, 15 Dec 2019 17:03:39 +0200 Subject: move import inside cfg block --- crates/ra_lsp_server/src/world.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs index be3a5bfb8..f139a5728 100644 --- a/crates/ra_lsp_server/src/world.rs +++ b/crates/ra_lsp_server/src/world.rs @@ -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::>(); -- cgit v1.2.3