Skip to content

Commit

Permalink
open_file_roにdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Sep 18, 2024
1 parent 80c707b commit 22c36e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/voicevox_core/src/asyncs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ impl Async for SingleTasked {
type Mutex<T: Send + Sync + Unpin> = StdMutex<T>;
type RoFile = StdFile;

/// ファイルを読み取り専用(RO)で開く。
///
/// `io::Error`は素(`i32`相当)のままにしておき、この関数を呼び出す側でfs-err風のメッセージを付
/// ける。
async fn open_file_ro(path: impl AsRef<Path>) -> io::Result<Self::RoFile> {
std::fs::File::open(path).map(StdFile)
}
Expand Down

0 comments on commit 22c36e0

Please sign in to comment.