Skip to content
Snippets Groups Projects
Verified Commit 13e4d9ab authored by Loris Moulin's avatar Loris Moulin
Browse files

chore: removed unused local_file, stdout will be hardcoded in provider at the moment

parent d08b6d41
Branches
No related merge requests found
use std::{
fs::File,
io::{Read, Write},
process::Stdio,
};
pub struct LocalFile(File);
impl From<File> for LocalFile {
fn from(file: File) -> Self {
LocalFile(file)
}
}
impl From<LocalFile> for Stdio {
fn from(value: LocalFile) -> Self {
value.0.into()
}
}
impl Write for LocalFile {
fn write(&mut self, buf: &[u8]) -> Result<usize, std::io::Error> {
self.0.write(buf)
}
fn flush(&mut self) -> Result<(), std::io::Error> {
self.0.flush()
}
}
impl Read for LocalFile {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
self.0.read(buf)
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment