pathbuf 1.0.0

A macro to conveniently build PathBufs
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented2 out of 2 items with examples
  • Size
  • Source code size: 15.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 136.31 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • alilleybrinker/pathbuf
    7 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • alilleybrinker

pathbuf

pathbuf is a simple crate which provides the pathbuf macro to conveniently construct the Rust PathBuf type.

Example

use pathbuf::pathbuf;
use std::path::PathBuf;

fn main() {
	let p = pathbuf!["hello", "filename.txt"];

	let expected = {
		let mut temp = PathBuf::new();
		temp.push("hello");
		temp.push("filename.txt");
		temp
	};

	assert_eq!(p, expected);
}

License

pathbuf is licensed under the Apache 2.0 license, and is itself a reproduction of the hc_pathbuf crate found in Hipcheck, pulled out into its own distinct crate for reuse.