Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / playground.rs
Created May 15, 2016 16:50
Shared via Rust Playground
use std::io::prelude::*;
use std::fs::File;
use std::io::{ Error, ErrorKind };
fn open_file(path: &str) -> Vec<u8> {
let mut f = match File::open( path ) {
Ok(x) => x,
Err(e) => match e.kind() {
ErrorKind::NotFound => /*idk what you want to do*/,
@mcous
mcous / Makefile
Last active June 10, 2020 17:23
Makefile PATH bug on macOS 10.14 and later
SHELL := /bin/bash
PATH := .:$(PATH)
.PHONY: broken
broken:
env
shell-script
.PHONY: also_broken
also_broken: