diff --git a/Cargo.lock b/Cargo.lock index 56026dbf1..515bce298 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1465,18 +1465,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "gimli" version = "0.27.3" @@ -2967,7 +2955,6 @@ dependencies = [ name = "nu-test-support" version = "0.82.1" dependencies = [ - "getset", "hamcrest2", "nu-glob", "nu-path", @@ -3968,30 +3955,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro-hack" version = "0.5.20+deprecated" diff --git a/crates/nu-test-support/Cargo.toml b/crates/nu-test-support/Cargo.toml index 951dac685..1d051977b 100644 --- a/crates/nu-test-support/Cargo.toml +++ b/crates/nu-test-support/Cargo.toml @@ -18,6 +18,5 @@ nu-utils = { path="../nu-utils", version = "0.82.1" } num-format = "0.4" which = "4.3" -getset = "0.1" tempfile = "3.2" hamcrest2 = "0.3" diff --git a/crates/nu-test-support/src/playground/play.rs b/crates/nu-test-support/src/playground/play.rs index 6fdb3334f..8ca71a9ef 100644 --- a/crates/nu-test-support/src/playground/play.rs +++ b/crates/nu-test-support/src/playground/play.rs @@ -1,7 +1,6 @@ use super::Director; use crate::fs; use crate::fs::Stub; -use getset::Getters; use nu_glob::glob; use std::path::{Path, PathBuf}; use std::str; @@ -31,8 +30,7 @@ pub struct Playground<'a> { dirs: &'a Dirs, } -#[derive(Default, Getters, Clone)] -#[get = "pub"] +#[derive(Default, Clone)] pub struct Dirs { pub root: PathBuf, pub test: PathBuf, @@ -47,6 +45,14 @@ impl Dirs { pub fn config_fixtures(&self) -> PathBuf { self.fixtures.join("playground/config") } + + pub fn root(&self) -> &PathBuf { + &self.root + } + + pub fn test(&self) -> &PathBuf { + &self.test + } } impl<'a> Playground<'a> {