Update examples

This commit is contained in:
sharkdp authored and David Peter committed 2020-04-22 23:55:28 +02:00
1 parent 49f4322054
commit 13f671b499
3 files changed
+4 -10

No files matched your search

+2 -2
View File
@@ -55,8 +55,8 @@ impl<'a> PrettyPrinter<'a> {
}
/// Add a file which should be pretty-printed
pub fn input_file(&mut self, path: &OsStr) -> &mut Self {
self.inputs.push(Input::ordinary_file(path));
pub fn input_file(&mut self, path: impl AsRef<OsStr>) -> &mut Self {
self.inputs.push(Input::ordinary_file(path.as_ref()));
self
}