From f032eeb05f0b7d77e30cd6c5eea016cc5d649e3f Mon Sep 17 00:00:00 2001 From: Muhammad Mominul Huque Date: Sat, 15 Jun 2019 13:24:02 +0600 Subject: [PATCH] Get rid of failure: ra_batch ra_cli --- Cargo.lock | 2 -- crates/gen_lsp_server/src/lib.rs | 2 +- crates/ra_batch/Cargo.toml | 2 -- crates/ra_batch/src/lib.rs | 7 +++---- crates/ra_cli/Cargo.toml | 1 - crates/ra_cli/src/main.rs | 4 ++-- crates/ra_syntax/src/lib.rs | 2 +- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 990672a0ac..03b5794fa1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1020,7 +1020,6 @@ dependencies = [ name = "ra_batch" version = "0.1.0" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "ra_db 0.1.0", "ra_hir 0.1.0", @@ -1036,7 +1035,6 @@ name = "ra_cli" version = "0.1.0" dependencies = [ "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "flexi_logger 0.11.5 (registry+https://github.com/rust-lang/crates.io-index)", "indicatif 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs index 7643dcacc8..7c4fbbee49 100644 --- a/crates/gen_lsp_server/src/lib.rs +++ b/crates/gen_lsp_server/src/lib.rs @@ -66,7 +66,7 @@ use lsp_types::{ InitializeParams, InitializeResult, ServerCapabilities, }; -pub type Result = ::std::result::Result>; +pub type Result = std::result::Result>; pub use crate::{ msg::{ErrorCode, RawMessage, RawNotification, RawRequest, RawResponse, RawResponseError}, stdio::{stdio_transport, Threads}, diff --git a/crates/ra_batch/Cargo.toml b/crates/ra_batch/Cargo.toml index 3037e27c41..8bf085bbfb 100644 --- a/crates/ra_batch/Cargo.toml +++ b/crates/ra_batch/Cargo.toml @@ -8,8 +8,6 @@ authors = ["rust-analyzer developers"] log = "0.4.5" rustc-hash = "1.0" -failure = "0.1.4" - ra_vfs = "0.2.0" ra_syntax = { path = "../ra_syntax" } ra_db = { path = "../ra_db" } diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index c59821f446..35e783b140 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs @@ -1,8 +1,7 @@ mod vfs_filter; -use std::sync::Arc; -use std::path::Path; -use std::collections::HashSet; +use std::{sync::Arc, path::Path, collections::HashSet, error::Error}; + use rustc_hash::FxHashMap; @@ -14,7 +13,7 @@ use ra_project_model::ProjectWorkspace; use ra_vfs::{Vfs, VfsChange}; use vfs_filter::IncludeRustFiles; -type Result = std::result::Result; +type Result = std::result::Result>; #[salsa::database( ra_db::SourceDatabaseStorage, diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index 3117f4fda1..57bd0c3d7d 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml @@ -7,7 +7,6 @@ publish = false [dependencies] clap = "2.32.0" -failure = "0.1.4" join_to_string = "0.1.1" flexi_logger = "0.11.0" indicatif = "0.11.0" diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index c9ca13bbc8..04370539a7 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs @@ -1,6 +1,6 @@ mod analysis_stats; -use std::io::Read; +use std::{io::Read, error::Error}; use clap::{App, Arg, SubCommand}; use ra_ide_api::{file_structure, Analysis}; @@ -8,7 +8,7 @@ use ra_syntax::{SourceFile, TreeArc, AstNode}; use flexi_logger::Logger; use ra_prof::profile; -type Result = ::std::result::Result; +type Result = ::std::result::Result>; fn main() -> Result<()> { Logger::with_env().start()?; diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs index 8c0ba6f2d3..e46ad12dbf 100644 --- a/crates/ra_syntax/src/lib.rs +++ b/crates/ra_syntax/src/lib.rs @@ -11,7 +11,7 @@ //! //! The most interesting modules here are `syntax_node` (which defines concrete //! syntax tree) and `ast` (which defines abstract syntax tree on top of the -//! CST). The actual parser live in a separate `ra_parser` crate, thought the +//! CST). The actual parser live in a separate `ra_parser` crate, though the //! lexer lives in this crate. //! //! See `api_walkthrough` test in this file for a quick API tour!