From: Ewan Higgs Date: Mon, 30 Jan 2017 09:38:46 +0000 (+0100) Subject: Remove unused 'file' function. X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~184^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=265452d49d1a004fb732b624f1f1e8496f75de7a;p=cargo.git Remove unused 'file' function. --- diff --git a/src/cargo/util/paths.rs b/src/cargo/util/paths.rs index 075a55a47..d47598a2e 100644 --- a/src/cargo/util/paths.rs +++ b/src/cargo/util/paths.rs @@ -2,7 +2,6 @@ use std::env; use std::ffi::{OsStr, OsString}; use std::fs::File; use std::fs::OpenOptions; -use std::io; use std::io::prelude::*; use std::path::{Path, PathBuf, Component}; @@ -68,10 +67,6 @@ pub fn without_prefix<'a>(a: &'a Path, b: &'a Path) -> Option<&'a Path> { } } -pub fn file(p: &Path, contents: &[u8]) -> io::Result<()> { - try!(File::create(p)).write_all(contents) -} - pub fn read(path: &Path) -> CargoResult { (|| -> CargoResult<_> { let mut ret = String::new();