tree-type 0.4.5

Rust macros for creating type-safe filesystem tree structures
Documentation
#![allow(deprecated)]

use tree_type::tree_type;

#[test]
fn test_multiple_symlinks_in_same_tree() {
    tree_type! {
        TestRoot {
            #[default("main content")]
            main("main.txt"),
            #[symlink(main)]
            backup1("backup1.txt"),
            #[symlink(main)]
            backup2("backup2.txt"),
            config/ {
                #[default("primary config")]
                primary("primary.toml"),
                #[symlink(primary)]
                secondary("secondary.toml")
            }
        }
    }

    // Just verify it compiles with multiple symlinks
    let _root = TestRoot::new("/tmp/test").unwrap();
}

#[test]
fn test_nested_symlinks() {
    tree_type! {
        TestRoot {
            data/ {
                #[default("original data")]
                original("data.txt"),
                #[symlink(original)]
                link1("link1.txt"),
                subdir/ {
                    #[default("local data")]
                    local("local.txt"),
                    #[symlink(local)]
                    link2("link2.txt")
                }
            }
        }
    }

    // Verify nested structure with symlinks compiles
    let _root = TestRoot::new("/tmp/test").unwrap();
}