Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/lib.rs')
-rw-r--r--helix-view/src/lib.rs20
1 files changed, 1 insertions, 19 deletions
diff --git a/helix-view/src/lib.rs b/helix-view/src/lib.rs
index 6d0903b1..46bcf7e6 100644
--- a/helix-view/src/lib.rs
+++ b/helix-view/src/lib.rs
@@ -20,25 +20,6 @@ pub mod theme;
pub mod tree;
pub mod view;
-use std::num::NonZeroUsize;
-
-// uses NonZeroUsize so Option<DocumentId> use a byte rather than two
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
-pub struct DocumentId(NonZeroUsize);
-
-impl Default for DocumentId {
- fn default() -> DocumentId {
- // Safety: 1 is non-zero
- DocumentId(unsafe { NonZeroUsize::new_unchecked(1) })
- }
-}
-
-impl std::fmt::Display for DocumentId {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- f.write_fmt(format_args!("{}", self.0))
- }
-}
-
slotmap::new_key_type! {
pub struct ViewId;
}
@@ -78,5 +59,6 @@ pub use action::Action;
pub use document::Document;
pub use editor::Editor;
use helix_core::char_idx_at_visual_offset;
+pub use helix_core::uri::DocumentId;
pub use theme::Theme;
pub use view::View;