From c123944d9b2e125cc0e17e61d53aaffe09234baf Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 11 May 2024 16:14:51 -0400 Subject: [PATCH 01/11] Implement check before adding path to files --- helix-term/src/args.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index 0b1c9cde08da..b0f9edff2dfa 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -95,13 +95,23 @@ impl Args { _ => args.files.push(parse_file(arg)), }; } - arg => args.files.push(parse_file(arg)), + arg => { + let file = parse_file(arg); + + if is_proper_file(&file) { + args.files.push(file) + } + } } } // push the remaining args, if any to the files for arg in argv { - args.files.push(parse_file(&arg)); + let file = parse_file(&arg); + + if is_proper_file(&file) { + args.files.push(file); + } } if let Some(file) = args.files.first_mut() { @@ -125,6 +135,11 @@ pub(crate) fn parse_file(s: &str) -> (PathBuf, Position) { .unwrap_or_else(def) } +/// Ensure file is not a pipe or random +fn is_proper_file(f: &(PathBuf, Position)) -> bool { + f.0.is_file() || f.0.is_symlink() +} + /// Split file.rs:10:2 into [`PathBuf`], row and col. /// /// Does not validate if file.rs is a file or directory. From a9d65b13d150c00240ef4e985db499f61dfefcfb Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 11 May 2024 16:32:11 -0400 Subject: [PATCH 02/11] fix problem where directories were removed from args.files --- helix-term/src/args.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index b0f9edff2dfa..ea721578faba 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -98,7 +98,7 @@ impl Args { arg => { let file = parse_file(arg); - if is_proper_file(&file) { + if is_proper_path(&file) { args.files.push(file) } } @@ -109,7 +109,7 @@ impl Args { for arg in argv { let file = parse_file(&arg); - if is_proper_file(&file) { + if is_proper_path(&file) { args.files.push(file); } } @@ -135,9 +135,9 @@ pub(crate) fn parse_file(s: &str) -> (PathBuf, Position) { .unwrap_or_else(def) } -/// Ensure file is not a pipe or random -fn is_proper_file(f: &(PathBuf, Position)) -> bool { - f.0.is_file() || f.0.is_symlink() +/// Ensure path is not something like a pipe or /dev/random. +fn is_proper_path(f: &(PathBuf, Position)) -> bool { + f.0.is_file() || f.0.is_symlink() || f.0.is_dir() } /// Split file.rs:10:2 into [`PathBuf`], row and col. From b027a4cf357c349bb447552cf5248f5f40991b95 Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 11 May 2024 20:37:05 -0400 Subject: [PATCH 03/11] Revert "Implement check before adding path to files" This reverts commit c123944d9b2e125cc0e17e61d53aaffe09234baf. --- helix-term/src/args.rs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index ea721578faba..12724aac2a83 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -95,23 +95,12 @@ impl Args { _ => args.files.push(parse_file(arg)), }; } - arg => { - let file = parse_file(arg); - - if is_proper_path(&file) { - args.files.push(file) - } - } - } + arg => args.files.push(parse_file(arg)), } // push the remaining args, if any to the files for arg in argv { - let file = parse_file(&arg); - - if is_proper_path(&file) { - args.files.push(file); - } + args.files.push(parse_file(&arg)); } if let Some(file) = args.files.first_mut() { @@ -135,11 +124,6 @@ pub(crate) fn parse_file(s: &str) -> (PathBuf, Position) { .unwrap_or_else(def) } -/// Ensure path is not something like a pipe or /dev/random. -fn is_proper_path(f: &(PathBuf, Position)) -> bool { - f.0.is_file() || f.0.is_symlink() || f.0.is_dir() -} - /// Split file.rs:10:2 into [`PathBuf`], row and col. /// /// Does not validate if file.rs is a file or directory. From 2ec829550be32f73d06e6e6412ceb0432a265cbe Mon Sep 17 00:00:00 2001 From: Alice Date: Sun, 12 May 2024 11:34:58 -0400 Subject: [PATCH 04/11] Dissallow opening of irregular non-symlink files --- helix-term/src/application.rs | 38 ++++++++++++++++++++++++----------- helix-term/src/args.rs | 1 + helix-view/src/document.rs | 18 +++++++++++++++++ 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index f71eed209eed..50d4539ba0b6 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -9,7 +9,7 @@ use helix_lsp::{ use helix_stdx::path::get_relative_path; use helix_view::{ align_view, - document::DocumentSavedEventResult, + document::{DocumentSavedEventResult, IrregularFileError}, editor::{ConfigEvent, EditorEvent}, graphics::Rect, theme, @@ -186,9 +186,17 @@ impl Application { Some(Layout::Horizontal) => Action::HorizontalSplit, None => Action::Load, }; - let doc_id = editor + let doc_id = match editor .open(&file, action) - .context(format!("open '{}'", file.to_string_lossy()))?; + .context(format!("open '{}'", file.to_string_lossy())) + { + // Ignore irregular files during application init. + Err(e) if e.is::() => { + nr_of_files -= 1; + continue; + } + a => a, + }?; // with Action::Load all documents have the same view // NOTE: this isn't necessarily true anymore. If // `--vsplit` or `--hsplit` are used, the file which is @@ -199,15 +207,21 @@ impl Application { doc.set_selection(view_id, pos); } } - editor.set_status(format!( - "Loaded {} file{}.", - nr_of_files, - if nr_of_files == 1 { "" } else { "s" } // avoid "Loaded 1 files." grammo - )); - // align the view to center after all files are loaded, - // does not affect views without pos since it is at the top - let (view, doc) = current!(editor); - align_view(doc, view, Align::Center); + + // if all files were invalid, replace with empty buffer + if nr_of_files == 0 { + editor.new_file(Action::VerticalSplit); + } else { + editor.set_status(format!( + "Loaded {} file{}.", + nr_of_files, + if nr_of_files == 1 { "" } else { "s" } // avoid "Loaded 1 files." grammo + )); + // align the view to center after all files are loaded, + // does not affect views without pos since it is at the top + let (view, doc) = current!(editor); + align_view(doc, view, Align::Center); + } } else { editor.new_file(Action::VerticalSplit); } diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index 12724aac2a83..0b1c9cde08da 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -96,6 +96,7 @@ impl Args { }; } arg => args.files.push(parse_file(arg)), + } } // push the remaining args, if any to the files diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 3393fbed7633..fb6150fa2991 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -117,6 +117,17 @@ pub struct SavePoint { revert: Mutex, } +#[derive(Debug)] +pub struct IrregularFileError { + msg: String, +} + +impl Display for IrregularFileError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.msg) + } +} + pub struct Document { pub(crate) id: DocumentId, text: Rope, @@ -686,6 +697,13 @@ impl Document { config_loader: Option>>, config: Arc>, ) -> Result { + // if the path is not a regular file (e.g.: /dev/random) it should not be opened + if !path.is_file() && !path.is_symlink() { + return Err(anyhow::anyhow!(IrregularFileError { + msg: format!("Path argument must be a regular file, a directory, or a symlink.") + })); + } + // Open the file if it exists, otherwise assume it is a new file (and thus empty). let (rope, encoding, has_bom) = if path.exists() { let mut file = From 945ac4e7e435d6cbf2d47937b6ae59f9f384981d Mon Sep 17 00:00:00 2001 From: "Alice C. Munduruca" Date: Sun, 12 May 2024 12:11:32 -0400 Subject: [PATCH 05/11] Fixed issue with creating new file from command line --- helix-view/src/document.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index fb6150fa2991..1df5836d2cd6 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -698,7 +698,7 @@ impl Document { config: Arc>, ) -> Result { // if the path is not a regular file (e.g.: /dev/random) it should not be opened - if !path.is_file() && !path.is_symlink() { + if path.exists() && !path.is_file() && !path.is_symlink() { return Err(anyhow::anyhow!(IrregularFileError { msg: format!("Path argument must be a regular file, a directory, or a symlink.") })); From 7e304ec526e21b2506693b0b36d4495456cbee50 Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 13 May 2024 11:31:45 -0400 Subject: [PATCH 06/11] Fixed linting error. --- helix-view/src/document.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 1df5836d2cd6..3f5355773b2e 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -700,7 +700,7 @@ impl Document { // if the path is not a regular file (e.g.: /dev/random) it should not be opened if path.exists() && !path.is_file() && !path.is_symlink() { return Err(anyhow::anyhow!(IrregularFileError { - msg: format!("Path argument must be a regular file, a directory, or a symlink.") + msg: "Path argument must be a regular file, a directory, or a symlink.".to_string() })); } From 587cef79a81240e3029e23569d2afbaf54313ccf Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 13 May 2024 12:57:18 -0400 Subject: [PATCH 07/11] Optimized regularity check as suggested in review --- helix-view/src/document.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 3f5355773b2e..091f82bdfe3d 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -698,7 +698,10 @@ impl Document { config: Arc>, ) -> Result { // if the path is not a regular file (e.g.: /dev/random) it should not be opened - if path.exists() && !path.is_file() && !path.is_symlink() { + if path + .metadata() + .map_or(false, |metadata| !metadata.is_file()) + { return Err(anyhow::anyhow!(IrregularFileError { msg: "Path argument must be a regular file, a directory, or a symlink.".to_string() })); From d3fb6b85bbf12f1283bab16769947dc02916c767 Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 15 Jun 2024 17:08:19 -0400 Subject: [PATCH 08/11] Created DocumentOpenError Sum Type to switch on in Application --- helix-term/src/application.rs | 7 +++---- helix-term/src/commands.rs | 1 + helix-term/src/ui/mod.rs | 5 ++++- helix-view/Cargo.toml | 1 + helix-view/src/document.rs | 33 +++++++++++++++------------------ helix-view/src/editor.rs | 4 ++-- 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 50d4539ba0b6..a74ed0a89030 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -9,7 +9,7 @@ use helix_lsp::{ use helix_stdx::path::get_relative_path; use helix_view::{ align_view, - document::{DocumentSavedEventResult, IrregularFileError}, + document::{DocumentOpenError, DocumentSavedEventResult}, editor::{ConfigEvent, EditorEvent}, graphics::Rect, theme, @@ -188,14 +188,13 @@ impl Application { }; let doc_id = match editor .open(&file, action) - .context(format!("open '{}'", file.to_string_lossy())) { // Ignore irregular files during application init. - Err(e) if e.is::() => { + Err(DocumentOpenError::IrregularFile) => { nr_of_files -= 1; continue; } - a => a, + a => a.context(format!("open '{}'", file.to_string_lossy())), }?; // with Action::Load all documents have the same view // NOTE: this isn't necessarily true anymore. If diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 7be2ea0954c9..a4ce2ab1f8a5 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -69,6 +69,7 @@ use crate::job::{self, Jobs}; use std::{ cmp::Ordering, collections::{HashMap, HashSet}, + error::Error, fmt, future::Future, io::Read, diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 5211c2e272ef..b8b9f3979fb4 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -29,7 +29,10 @@ pub use text::Text; use helix_view::Editor; -use std::path::PathBuf; +use std::{ + error::Error, + path::PathBuf +}; pub fn prompt( cx: &mut crate::commands::Context, diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index 41ac6f527dae..42826b115d9d 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -50,6 +50,7 @@ toml = "0.8" log = "~0.4" parking_lot = "0.12.2" +thiserror = "1.0" [target.'cfg(windows)'.dependencies] diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 091f82bdfe3d..ba21f3e82eaa 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, bail, Context, Error}; +use anyhow::{anyhow, bail, Error}; use arc_swap::access::DynAccess; use arc_swap::ArcSwap; use futures_util::future::BoxFuture; @@ -12,6 +12,7 @@ use helix_core::text_annotations::{InlineAnnotation, Overlay}; use helix_lsp::util::lsp_pos_to_pos; use helix_stdx::faccess::{copy_metadata, readonly}; use helix_vcs::{DiffHandle, DiffProviderRegistry}; +use thiserror; use ::parking_lot::Mutex; use serde::de::{self, Deserialize, Deserializer}; @@ -21,6 +22,7 @@ use std::cell::Cell; use std::collections::HashMap; use std::fmt::Display; use std::future::Future; +use std::io; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::{Arc, Weak}; @@ -117,15 +119,12 @@ pub struct SavePoint { revert: Mutex, } -#[derive(Debug)] -pub struct IrregularFileError { - msg: String, -} - -impl Display for IrregularFileError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.msg) - } +#[derive(Debug, thiserror::Error)] +pub enum DocumentOpenError { + #[error("path must be a regular file, simlink, or directory")] + IrregularFile, + #[error(transparent)] + IoError(#[from] io::Error), } pub struct Document { @@ -391,7 +390,7 @@ fn apply_bom(encoding: &'static encoding::Encoding, buf: &mut [u8; BUF_SIZE]) -> pub fn from_reader( reader: &mut R, encoding: Option<&'static Encoding>, -) -> Result<(Rope, &'static Encoding, bool), Error> { +) -> Result<(Rope, &'static Encoding, bool), io::Error> { // These two buffers are 8192 bytes in size each and are used as // intermediaries during the decoding process. Text read into `buf` // from `reader` is decoded into `buf_out` as UTF-8. Once either @@ -534,7 +533,7 @@ fn read_and_detect_encoding( reader: &mut R, encoding: Option<&'static Encoding>, buf: &mut [u8], -) -> Result<(&'static Encoding, bool, encoding::Decoder, usize), Error> { +) -> Result<(&'static Encoding, bool, encoding::Decoder, usize), io::Error> { let read = reader.read(buf)?; let is_empty = read == 0; let (encoding, has_bom) = encoding @@ -696,21 +695,19 @@ impl Document { encoding: Option<&'static Encoding>, config_loader: Option>>, config: Arc>, - ) -> Result { - // if the path is not a regular file (e.g.: /dev/random) it should not be opened + ) -> Result { + // If the path is not a regular file (e.g.: /dev/random) it should not be opened. if path .metadata() .map_or(false, |metadata| !metadata.is_file()) { - return Err(anyhow::anyhow!(IrregularFileError { - msg: "Path argument must be a regular file, a directory, or a symlink.".to_string() - })); + return Err(DocumentOpenError::IrregularFile); } // Open the file if it exists, otherwise assume it is a new file (and thus empty). let (rope, encoding, has_bom) = if path.exists() { let mut file = - std::fs::File::open(path).context(format!("unable to open {:?}", path))?; + std::fs::File::open(path)?; from_reader(&mut file, encoding)? } else { let line_ending: LineEnding = config.load().default_line_ending.into(); diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 5540c5182944..1d42ef2005b8 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1,6 +1,6 @@ use crate::{ align_view, - document::{DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint}, + document::{DocumentSavedEventFuture, DocumentSavedEventResult, DocumentOpenError, Mode, SavePoint}, graphics::{CursorKind, Rect}, handlers::Handlers, info::Info, @@ -1616,7 +1616,7 @@ impl Editor { } // ??? possible use for integration tests - pub fn open(&mut self, path: &Path, action: Action) -> Result { + pub fn open(&mut self, path: &Path, action: Action) -> Result { let path = helix_stdx::path::canonicalize(path); let id = self.document_by_path(&path).map(|doc| doc.id); From 23895211c40e9820b93555cc0fab098ce7d35cf9 Mon Sep 17 00:00:00 2001 From: Alice Date: Sat, 15 Jun 2024 17:09:34 -0400 Subject: [PATCH 09/11] Forgot cargo fmt --- helix-term/src/application.rs | 4 +--- helix-term/src/ui/mod.rs | 5 +---- helix-view/src/document.rs | 3 +-- helix-view/src/editor.rs | 4 +++- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index a74ed0a89030..fbdf4644dacf 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -186,9 +186,7 @@ impl Application { Some(Layout::Horizontal) => Action::HorizontalSplit, None => Action::Load, }; - let doc_id = match editor - .open(&file, action) - { + let doc_id = match editor.open(&file, action) { // Ignore irregular files during application init. Err(DocumentOpenError::IrregularFile) => { nr_of_files -= 1; diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index b8b9f3979fb4..6a4655fde23d 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -29,10 +29,7 @@ pub use text::Text; use helix_view::Editor; -use std::{ - error::Error, - path::PathBuf -}; +use std::{error::Error, path::PathBuf}; pub fn prompt( cx: &mut crate::commands::Context, diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index ba21f3e82eaa..aff45b205d43 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -706,8 +706,7 @@ impl Document { // Open the file if it exists, otherwise assume it is a new file (and thus empty). let (rope, encoding, has_bom) = if path.exists() { - let mut file = - std::fs::File::open(path)?; + let mut file = std::fs::File::open(path)?; from_reader(&mut file, encoding)? } else { let line_ending: LineEnding = config.load().default_line_ending.into(); diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 1d42ef2005b8..1aaa37501fb4 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1,6 +1,8 @@ use crate::{ align_view, - document::{DocumentSavedEventFuture, DocumentSavedEventResult, DocumentOpenError, Mode, SavePoint}, + document::{ + DocumentOpenError, DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint, + }, graphics::{CursorKind, Rect}, handlers::Handlers, info::Info, From 221c0080aa9ff3bfd7a6035046127f2710901442 Mon Sep 17 00:00:00 2001 From: TiredTumblrina <144416919+TiredTumblrina@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:36:21 -0400 Subject: [PATCH 10/11] Update helix-term/src/application.rs Accept suggestion in review. Co-authored-by: Michael Davis --- helix-term/src/application.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index fbdf4644dacf..9adc764cc51b 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -192,8 +192,9 @@ impl Application { nr_of_files -= 1; continue; } - a => a.context(format!("open '{}'", file.to_string_lossy())), - }?; + Err(err) => return Err(anyhow::anyhow!(err)), + Ok(doc_id) => doc_id, + }; // with Action::Load all documents have the same view // NOTE: this isn't necessarily true anymore. If // `--vsplit` or `--hsplit` are used, the file which is From e94771b1ce971eb09d9621eba35876f9402bbbb5 Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 17 Jun 2024 18:37:41 -0400 Subject: [PATCH 11/11] Moved thiserror version configuration to the workspace instead of the individual packages. --- Cargo.toml | 1 + helix-dap/Cargo.toml | 2 +- helix-lsp/Cargo.toml | 2 +- helix-view/Cargo.toml | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6206281b7fb6..e3ee1031929f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ package.helix-term.opt-level = 2 tree-sitter = { version = "0.22" } nucleo = "0.2.0" slotmap = "1.0.7" +thiserror = "1.0" [workspace.package] version = "24.3.0" diff --git a/helix-dap/Cargo.toml b/helix-dap/Cargo.toml index 3521f5890aeb..c37340cc6037 100644 --- a/helix-dap/Cargo.toml +++ b/helix-dap/Cargo.toml @@ -20,8 +20,8 @@ anyhow = "1.0" log = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -thiserror = "1.0" tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "net", "sync"] } +thiserror.workspace = true [dev-dependencies] fern = "0.6" diff --git a/helix-lsp/Cargo.toml b/helix-lsp/Cargo.toml index b1b267347644..06e7064e74e3 100644 --- a/helix-lsp/Cargo.toml +++ b/helix-lsp/Cargo.toml @@ -26,9 +26,9 @@ log = "0.4" lsp-types = { version = "0.95" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -thiserror = "1.0" tokio = { version = "1.37", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "sync"] } tokio-stream = "0.1.15" parking_lot = "0.12.2" arc-swap = "1" slotmap.workspace = true +thiserror.workspace = true diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml index 42826b115d9d..30680b067cf7 100644 --- a/helix-view/Cargo.toml +++ b/helix-view/Cargo.toml @@ -50,8 +50,7 @@ toml = "0.8" log = "~0.4" parking_lot = "0.12.2" -thiserror = "1.0" - +thiserror.workspace = true [target.'cfg(windows)'.dependencies] clipboard-win = { version = "5.3", features = ["std"] }