diff --git a/src/util/mod.rs b/src/util/mod.rs index 67f52d3..e64e699 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -186,25 +186,6 @@ pub async fn untrash(path: &Path) -> anyhow::Result<()> { error } -pub trait BufReadSeek: std::io::BufRead + std::io::Seek {} - -impl BufReadSeek for std::io::BufReader> {} - -pub trait ToBufRead { - fn to_buf_read(&self, cancellable: &gio::Cancellable) -> anyhow::Result>; -} - -impl ToBufRead for gio::File { - fn to_buf_read(&self, cancellable: &gio::Cancellable) -> anyhow::Result> { - 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)] pub enum Position { First,