egui: remove long-superseded `channel_text()` routine

This commit is contained in:
Mikolaj Wielgus 2024-09-28 21:37:54 +02:00
parent 12f43a112e
commit 55be63b942
2 changed files with 1 additions and 13 deletions

View File

@ -220,15 +220,3 @@ pub fn execute<F: Future<Output = ()> + Send + 'static>(f: F) {
pub fn execute<F: Future<Output = ()> + 'static>(f: F) { pub fn execute<F: Future<Output = ()> + 'static>(f: F) {
wasm_bindgen_futures::spawn_local(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()
}

View File

@ -15,7 +15,7 @@ use topola::{
use crate::{ use crate::{
action::{Action, Switch, Trigger}, action::{Action, Switch, Trigger},
app::{channel_text, execute}, app::execute,
file_sender::FileSender, file_sender::FileSender,
overlay::Overlay, overlay::Overlay,
translator::Translator, translator::Translator,