diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0850ad5..b5e1dbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,4 +43,4 @@ jobs: - name: Clippy run: cargo clippy --all -- -D warnings - name: Run tests - run: cargo test --features span --features --v1 --all --verbose + run: cargo test --features span --features v1 --all --verbose diff --git a/src/document.rs b/src/document.rs index d9268b5..8951d10 100644 --- a/src/document.rs +++ b/src/document.rs @@ -2,7 +2,9 @@ use miette::SourceSpan; use std::fmt::Display; -use crate::{FormatConfig, KdlError, KdlNode, KdlNodeFormat, KdlValue}; +use crate::{FormatConfig, KdlError, KdlNode, KdlValue}; +#[cfg(feature = "v1")] +use crate::KdlNodeFormat; /// Represents a KDL /// [`Document`](https://github.com/kdl-org/kdl/blob/main/SPEC.md#document). @@ -353,7 +355,6 @@ impl KdlDocument { } /// Parses a KDL v2 string into a document. - #[cfg(feature = "v1")] pub fn parse_v2(s: &str) -> Result { crate::v2_parser::try_parse(crate::v2_parser::document, s) }