From 2efe50813c54fb6856ccc1e09bfca8dfa37d39d8 Mon Sep 17 00:00:00 2001 From: amtoine Date: Tue, 22 Aug 2023 19:28:50 +0200 Subject: [PATCH] compile nu::cell_path only during tests --- src/nu/cell_path.rs | 2 -- src/nu/mod.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nu/cell_path.rs b/src/nu/cell_path.rs index 0054cb3..286a209 100644 --- a/src/nu/cell_path.rs +++ b/src/nu/cell_path.rs @@ -1,6 +1,5 @@ use nu_protocol::{ast::PathMember, Span}; -#[allow(dead_code)] /// a simplified [`PathMember`] that can be put in a single vector, without being too long pub(crate) enum PM<'a> { // the [`PathMember::String`] variant @@ -9,7 +8,6 @@ pub(crate) enum PM<'a> { I(usize), } -#[allow(dead_code)] pub(crate) fn to_path_member_vec(cell_path: Vec) -> Vec { cell_path .iter() diff --git a/src/nu/mod.rs b/src/nu/mod.rs index f2abc38..74c0228 100644 --- a/src/nu/mod.rs +++ b/src/nu/mod.rs @@ -1,2 +1,3 @@ +#[cfg(test)] pub(super) mod cell_path; pub(super) mod value;