cargo: Update and cleanup dependencies
- Replace one remaining use of util::spawn with gio - Replace pretty_env_logger with env_logger Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/149>
This commit is contained in:
parent
52c6f4333d
commit
7bcc5e210b
5 changed files with 226 additions and 281 deletions
12
src/util.rs
12
src/util.rs
|
|
@ -155,18 +155,6 @@ pub async fn untrash(path: &Path) -> anyhow::Result<()> {
|
|||
error
|
||||
}
|
||||
|
||||
pub async fn spawn<T: Debug + Send + 'static>(
|
||||
name: &str,
|
||||
f: impl Fn() -> T + Send + 'static,
|
||||
) -> async_std::io::Result<T> {
|
||||
log::trace!("Starting thread '{name}'");
|
||||
|
||||
Ok(async_std::task::Builder::new()
|
||||
.name(name.to_string())
|
||||
.spawn(async_global_executor::spawn_blocking(f))?
|
||||
.await)
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum Position {
|
||||
First,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue