mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-30 10:03:58 +01:00
11 lines
263 B
Rust
11 lines
263 B
Rust
use std::{fs::File, path::Path};
|
|
|
|
use anyhow::Context;
|
|
|
|
pub(crate) use std::fs::*;
|
|
|
|
pub(crate) fn open_file(path: impl AsRef<Path>) -> anyhow::Result<File> {
|
|
let path = path.as_ref();
|
|
File::open(path).with_context(|| format!("failed to open {path:?}"))
|
|
}
|