diff --git a/libs/lsp-server-wrapper/src/jsonrpc.rs b/libs/lsp-server-wrapper/src/jsonrpc.rs index 664d6868..a7ead68f 100644 --- a/libs/lsp-server-wrapper/src/jsonrpc.rs +++ b/libs/lsp-server-wrapper/src/jsonrpc.rs @@ -1,4 +1,4 @@ mod error; pub(crate) use self::error::not_initialized_error; -pub use self::error::{Error, ErrorCode, Result}; +pub use self::error::{Error, Result}; diff --git a/toolchains/solidity/core/crates/foundry-compiler-server/src/utils.rs b/toolchains/solidity/core/crates/foundry-compiler-server/src/utils.rs index 9c3f0598..15648f3f 100644 --- a/toolchains/solidity/core/crates/foundry-compiler-server/src/utils.rs +++ b/toolchains/solidity/core/crates/foundry-compiler-server/src/utils.rs @@ -7,7 +7,7 @@ use tower_lsp::lsp_types::{DiagnosticSeverity, InitializeParams}; * @returns {Option} Normalized path */ pub fn get_root_path(params: InitializeParams) -> Option { - if let Some(folder) = params.workspace_folders?.get(0) { + if let Some(folder) = params.workspace_folders?.first() { return Some(normalize_path(folder.uri.path())); } else if let Some(root_uri) = params.root_uri { return Some(normalize_path(root_uri.path()));