I hereby claim:
- I am telotortium on github.
- I am telotortium (https://keybase.io/telotortium) on keybase.
- I have a public key ASC8vnPgw7QTEovVVKh_9_8LCjUrSP1J5iPjS0ZM7WnDRgo
To claim this, I am signing this object:
javascript:!function(){var e=document.querySelectorAll(".commentholder a.comment-hide-link");(e=Array.prototype.slice.call(e)).reverse(),e.forEach(function(e){"Hide"==e.text&&commentToggle.call(e)});var o=document.querySelectorAll(".commentholder.new-comment");(o=Array.prototype.slice.call(o)).forEach(function(e){var o=[];for(comment=e;null!=comment;){o.unshift(comment);var t=comment.parentElement.closest(".comment");if(null!=t&&comment.classList.contains("depth-5")){var c=t.querySelectorAll(".comment.depth-5");o=o.concat(Array.prototype.slice.call(c))}comment=t}o.forEach(function(e){var o=e.querySelector(".commentholder a.comment-hide-link");"Show"==o.text&&commentToggle.call(o)})})}(); |
I hereby claim:
To claim this, I am signing this object:
// Append an extension to a `std::path::Path`. | |
// | |
// append_extension(Path::new("/path/to/file.txt"), Some("gz")) | |
// == Path::new("/path/to/file.txt.gz") | |
fn append_extension(path: Path, ext: Option<&str>) -> Path { | |
let orig_ext = path.extension_str(); | |
let combined_ext_comps: ~[&str] = [orig_ext, ext].iter() | |
.filter_map(|&x| x).map(|x| x.clone()).collect(); | |
let combined_ext = combined_ext_comps.connect("."); | |
path.with_extension(combined_ext.as_slice()) |