Skip to content

Commit 2a042fc

Browse files
committed
Fix clippy 1.43
1 parent 705886f commit 2a042fc

File tree

7 files changed

+8
-24
lines changed

7 files changed

+8
-24
lines changed

vhdl_lang/src/config.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@
66

77
//! Configuration of the design hierarchy and other settings
88
9-
use toml;
10-
11-
use self::fnv::FnvHashMap;
12-
use self::toml::Value;
139
use crate::data::*;
14-
use fnv;
10+
use fnv::FnvHashMap;
1511
use std::env;
1612
use std::fs::File;
1713
use std::io;
1814
use std::io::prelude::*;
1915
use std::path::Path;
16+
use toml::Value;
2017

2118
#[derive(Clone, PartialEq, Default, Debug)]
2219
pub struct Config {

vhdl_lang/src/data/source.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use super::contents::Contents;
88
use super::diagnostic::{Diagnostic, DiagnosticResult};
9-
use pad;
109
use parking_lot::{RwLock, RwLockReadGuard};
1110
use std::cmp::{max, min};
1211
use std::collections::hash_map::DefaultHasher;
@@ -399,7 +398,7 @@ impl SrcPos {
399398
context_lines: u32,
400399
) -> (usize, String) {
401400
let lines = self.get_line_context(context_lines, contents);
402-
use self::pad::{Alignment, PadStr};
401+
use pad::{Alignment, PadStr};
403402
// +1 since lines are shown with 1-index
404403
let lineno_len = (self.range.start.line + context_lines + 1)
405404
.to_string()

vhdl_lang/src/data/symbol_table.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ use super::latin_1::Latin1String;
88
use parking_lot::RwLock;
99
use std::sync::Arc;
1010

11-
use self::fnv::FnvHashMap;
12-
use fnv;
11+
use fnv::FnvHashMap;
1312

1413
/// Represents a unique string symbol.
1514
///

vhdl_ls/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
//
55
// Copyright (c) 2018, Olof Kraigher olof.kraigher@gmail.com
66

7-
use vhdl_ls;
8-
97
#[macro_use]
108
extern crate log;
11-
use env_logger;
129

1310
fn main() {
1411
use clap::App;

vhdl_ls/src/rpc_channel.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//! Contains the RpcChannel Traid and associated convenience functions
88
99
use lsp_types::*;
10-
use serde;
1110
use vhdl_lang::{Message, MessageHandler};
1211

1312
pub trait RpcChannel {

vhdl_ls/src/stdio_server.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@
44
//
55
// Copyright (c) 2018, Olof Kraigher olof.kraigher@gmail.com
66

7-
use jsonrpc_core;
8-
9-
use serde;
10-
use serde_json;
11-
12-
use self::jsonrpc_core::request::Notification;
13-
use self::jsonrpc_core::{IoHandler, Params};
7+
use jsonrpc_core::request::Notification;
8+
use jsonrpc_core::{IoHandler, Params};
149
use std::io::prelude::*;
1510
use std::io::{self, BufRead};
1611

vhdl_ls/src/vhdl_server.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66

77
use lsp_types::*;
88

9-
use self::fnv::FnvHashMap;
10-
use fnv;
9+
use fnv::FnvHashMap;
1110
use std::collections::hash_map::Entry;
1211

13-
use self::vhdl_lang::{Config, Diagnostic, Message, Project, Severity, Source, SrcPos};
1412
use crate::rpc_channel::{MessageChannel, RpcChannel};
1513
use std::io;
1614
use std::path::{Path, PathBuf};
17-
use vhdl_lang;
15+
use vhdl_lang::{Config, Diagnostic, Message, Project, Severity, Source, SrcPos};
1816

1917
pub struct VHDLServer<T: RpcChannel + Clone> {
2018
rpc_channel: T,

0 commit comments

Comments
 (0)