From b097c7e21b3b8dd92bc112f126672a8810d2d711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sat, 21 Dec 2024 17:52:56 -0800 Subject: [PATCH] fix(clippy): clippy fixes --- .github/workflows/ci.yml | 2 +- src/document.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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) }