util: Remove unused code

This commit is contained in:
Sophie Herold 2024-05-08 22:53:50 +02:00
parent bc6020a484
commit 74482bf6b6

View file

@ -186,25 +186,6 @@ pub async fn untrash(path: &Path) -> anyhow::Result<()> {
error error
} }
pub trait BufReadSeek: std::io::BufRead + std::io::Seek {}
impl BufReadSeek for std::io::BufReader<gio::InputStreamRead<gio::FileInputStream>> {}
pub trait ToBufRead {
fn to_buf_read(&self, cancellable: &gio::Cancellable) -> anyhow::Result<Box<dyn BufReadSeek>>;
}
impl ToBufRead for gio::File {
fn to_buf_read(&self, cancellable: &gio::Cancellable) -> anyhow::Result<Box<dyn BufReadSeek>> {
let read = self
.read(Some(cancellable))
.context(gettext("Failed to open image"))?
.into_read();
Ok(Box::new(std::io::BufReader::new(read)))
}
}
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum Position { pub enum Position {
First, First,