From 55be63b942d5b778de45fda45ac1b6afde9a016e Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sat, 28 Sep 2024 21:37:54 +0200 Subject: [PATCH] egui: remove long-superseded `channel_text()` routine --- src/bin/topola-egui/app.rs | 12 ------------ src/bin/topola-egui/top.rs | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/bin/topola-egui/app.rs b/src/bin/topola-egui/app.rs index ea89b97..b6f1095 100644 --- a/src/bin/topola-egui/app.rs +++ b/src/bin/topola-egui/app.rs @@ -220,15 +220,3 @@ pub fn execute + Send + 'static>(f: F) { pub fn execute + 'static>(f: F) { wasm_bindgen_futures::spawn_local(f); } - -#[cfg(not(target_arch = "wasm32"))] -pub async fn channel_text(file_handle: rfd::FileHandle) -> String { - file_handle.path().to_str().unwrap().to_string() -} - -#[cfg(target_arch = "wasm32")] -pub async fn channel_text(file_handle: rfd::FileHandle) -> String { - std::str::from_utf8(&file_handle.read().await) - .unwrap() - .to_string() -} diff --git a/src/bin/topola-egui/top.rs b/src/bin/topola-egui/top.rs index ee2151f..634f501 100644 --- a/src/bin/topola-egui/top.rs +++ b/src/bin/topola-egui/top.rs @@ -15,7 +15,7 @@ use topola::{ use crate::{ action::{Action, Switch, Trigger}, - app::{channel_text, execute}, + app::execute, file_sender::FileSender, overlay::Overlay, translator::Translator,