micronfig 2.0.2

Macro-based configuration management
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// **Private**; utilities for testing.

pub fn tempfile_fixture(content: &str) -> tempfile::TempPath {
	use std::io::Write;

	let mut file = tempfile::NamedTempFile::new()
		.expect("the tempfile fixture to be created successfully");
	write!(file, "{}", content)
		.expect("to be able to write into the tempfile fixture");

	file.into_temp_path()
}