Skip to content

Commit f91a487

Browse files
committed
Fix clippy issues
1 parent fb2b81c commit f91a487

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

vhdl_lang/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl Config {
164164

165165
let parent = file_name.parent().unwrap();
166166

167-
Config::from_str(&contents, parent).map_err(|msg| io::Error::new(io::ErrorKind::Other, msg))
167+
Config::from_str(&contents, parent).map_err(io::Error::other)
168168
}
169169

170170
pub fn get_library(&self, name: &str) -> Option<&LibraryConfig> {

vhdl_lang/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//
55
// Copyright (c) 2018, Olof Kraigher [email protected]
66
#![allow(clippy::upper_case_acronyms)]
7+
#![allow(clippy::large_enum_variant)]
8+
#![allow(clippy::result_large_err)]
79
#![warn(rust_2018_idioms, future_incompatible)]
810

911
#[macro_use]

vhdl_ls/src/vhdl_server.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,10 @@ impl VHDLServer {
101101

102102
/// Load the workspace root configuration file
103103
fn load_root_uri_config(&self) -> io::Result<Config> {
104-
let config_file = self.config_file.as_ref().ok_or_else(|| {
105-
io::Error::new(
106-
io::ErrorKind::Other,
107-
"Workspace root configuration file not set",
108-
)
109-
})?;
104+
let config_file = self
105+
.config_file
106+
.as_ref()
107+
.ok_or_else(|| io::Error::other("Workspace root configuration file not set"))?;
110108
let config = Config::read_file_path(config_file)?;
111109

112110
// Log which file was loaded

0 commit comments

Comments
 (0)