4 releases (2 breaking)

0.2.0 Jul 31, 2021
0.1.0 Jul 3, 2021
0.0.1 Jul 3, 2021
0.0.0 Jan 1, 2020

#1036 in Data structures

Download history 55/week @ 2023-12-04 23/week @ 2023-12-11 151/week @ 2023-12-18 275/week @ 2023-12-25 139/week @ 2024-01-01 208/week @ 2024-01-08 49/week @ 2024-01-15 26/week @ 2024-01-22 33/week @ 2024-01-29 34/week @ 2024-02-05 123/week @ 2024-02-12 71/week @ 2024-02-19 94/week @ 2024-02-26 188/week @ 2024-03-04 163/week @ 2024-03-11 73/week @ 2024-03-18

525 downloads per month
Used in 2 crates

CC0 license

7KB
111 lines

temptree: temporary trees of files


lib.rs:

Temptree creates temporary trees of files:

use temptree::temptree;

let tree = temptree! {
  foo: "a",
  bar: {
    baz: "b",
  },
};

let foo_contents = std::fs::read_to_string(tree.path().join("foo")).unwrap();
assert_eq!(foo_contents, "a");

let baz_contents = std::fs::read_to_string(tree.path().join("bar/baz")).unwrap();
assert_eq!(baz_contents, "b");

Dependencies

~2–12MB
~116K SLoC