aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/document.rs
diff options
context:
space:
mode:
authorIvan Tham2021-06-07 14:34:19 +0000
committerBlaž Hrastnik2021-06-10 13:00:08 +0000
commit7cc13fefe9bd09ea778a0eb8c26bf133e6ad2476 (patch)
tree764c662e47f12134a8a7f20211573243100777a5 /helix-view/src/document.rs
parent1a3a92463405fdd4738fbdbfda212aef58a2919d (diff)
Derive debug without feature
Note that this also removed those `finish_non_exhaustive()`.
Diffstat (limited to 'helix-view/src/document.rs')
-rw-r--r--helix-view/src/document.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index dd40421f..6a687955 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -13,8 +13,7 @@ use crate::{DocumentId, ViewId};
use std::collections::HashMap;
-#[cfg_attr(feature = "debug", derive(Debug))]
-#[derive(Copy, Clone, PartialEq, Eq, Hash)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum Mode {
Normal,
Select,
@@ -53,9 +52,7 @@ pub struct Document {
language_server: Option<Arc<helix_lsp::Client>>,
}
-#[cfg(feature = "debug")]
use std::fmt;
-#[cfg(feature = "debug")]
impl fmt::Debug for Document {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Document")
@@ -74,7 +71,7 @@ impl fmt::Debug for Document {
.field("version", &self.version)
.field("diagnostics", &self.diagnostics)
// .field("language_server", &self.language_server)
- .finish_non_exhaustive()
+ .finish()
}
}