mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
use pythonic import order
use std // blank line use extern crates // blank line use crate::{}
This commit is contained in:
parent
8eea10e3ab
commit
6e88aaef5d
@ -1,4 +1,5 @@
|
|||||||
use crate::{imp::FileResolverImp, FileId};
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
ast::{self, AstNode, NameOwner},
|
ast::{self, AstNode, NameOwner},
|
||||||
text_utils::is_subrange,
|
text_utils::is_subrange,
|
||||||
@ -6,7 +7,7 @@ use ra_syntax::{
|
|||||||
};
|
};
|
||||||
use relative_path::RelativePathBuf;
|
use relative_path::RelativePathBuf;
|
||||||
|
|
||||||
use std::collections::BTreeMap;
|
use crate::{imp::FileResolverImp, FileId};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq, Hash)]
|
#[derive(Debug, PartialEq, Eq, Hash)]
|
||||||
pub struct ModuleDescriptor {
|
pub struct ModuleDescriptor {
|
||||||
|
@ -23,11 +23,12 @@ mod symbol_index;
|
|||||||
|
|
||||||
use std::{fmt::Debug, sync::Arc};
|
use std::{fmt::Debug, sync::Arc};
|
||||||
|
|
||||||
use crate::imp::{AnalysisHostImpl, AnalysisImpl, FileResolverImp};
|
|
||||||
use ra_syntax::{AtomEdit, File, TextRange, TextUnit};
|
use ra_syntax::{AtomEdit, File, TextRange, TextUnit};
|
||||||
use relative_path::{RelativePath, RelativePathBuf};
|
use relative_path::{RelativePath, RelativePathBuf};
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
|
use crate::imp::{AnalysisHostImpl, AnalysisImpl, FileResolverImp};
|
||||||
|
|
||||||
pub use crate::{
|
pub use crate::{
|
||||||
descriptors::FnDescriptor,
|
descriptors::FnDescriptor,
|
||||||
job::{JobHandle, JobToken},
|
job::{JobHandle, JobToken},
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
use crate::{FileId, Query};
|
use std::{
|
||||||
|
hash::{Hash, Hasher},
|
||||||
|
sync::Arc,
|
||||||
|
};
|
||||||
|
|
||||||
use fst::{self, Streamer};
|
use fst::{self, Streamer};
|
||||||
use ra_editor::{file_symbols, FileSymbol};
|
use ra_editor::{file_symbols, FileSymbol};
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
@ -7,10 +11,7 @@ use ra_syntax::{
|
|||||||
};
|
};
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
|
|
||||||
use std::{
|
use crate::{FileId, Query};
|
||||||
hash::{Hash, Hasher},
|
|
||||||
sync::Arc,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct SymbolIndex {
|
pub(crate) struct SymbolIndex {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use rustc_hash::FxHashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
|
use rustc_hash::FxHashMap;
|
||||||
use languageserver_types::{
|
use languageserver_types::{
|
||||||
CodeActionResponse, Command, CompletionItem, CompletionItemKind, Diagnostic,
|
CodeActionResponse, Command, CompletionItem, CompletionItemKind, Diagnostic,
|
||||||
DiagnosticSeverity, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams,
|
DiagnosticSeverity, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams,
|
||||||
@ -18,8 +19,6 @@ use crate::{
|
|||||||
Result,
|
Result,
|
||||||
};
|
};
|
||||||
|
|
||||||
use std::collections::HashMap;
|
|
||||||
|
|
||||||
pub fn handle_syntax_tree(
|
pub fn handle_syntax_tree(
|
||||||
world: ServerWorld,
|
world: ServerWorld,
|
||||||
params: req::SyntaxTreeParams,
|
params: req::SyntaxTreeParams,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
use std::path::{Component, Path, PathBuf};
|
||||||
|
|
||||||
use im;
|
use im;
|
||||||
use ra_analysis::{FileId, FileResolver};
|
use ra_analysis::{FileId, FileResolver};
|
||||||
use relative_path::RelativePath;
|
use relative_path::RelativePath;
|
||||||
|
|
||||||
use std::path::{Component, Path, PathBuf};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum Root {
|
pub enum Root {
|
||||||
Workspace,
|
Workspace,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use cargo_metadata::{metadata_run, CargoOpt};
|
use cargo_metadata::{metadata_run, CargoOpt};
|
||||||
use ra_syntax::SmolStr;
|
use ra_syntax::SmolStr;
|
||||||
use rustc_hash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
|
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
thread_watcher::{ThreadWatcher, Worker},
|
thread_watcher::{ThreadWatcher, Worker},
|
||||||
Result,
|
Result,
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
use crate::Result;
|
use std::thread;
|
||||||
|
|
||||||
use crossbeam_channel::{bounded, unbounded, Receiver, Sender};
|
use crossbeam_channel::{bounded, unbounded, Receiver, Sender};
|
||||||
use drop_bomb::DropBomb;
|
use drop_bomb::DropBomb;
|
||||||
|
|
||||||
use std::thread;
|
use crate::Result;
|
||||||
|
|
||||||
pub struct Worker<I, O> {
|
pub struct Worker<I, O> {
|
||||||
pub inp: Sender<I>,
|
pub inp: Sender<I>,
|
||||||
|
Loading…
Reference in New Issue
Block a user