chore: Rust 2024 edition
This commit is contained in:
parent
8d9da92dba
commit
8a0b37bd36
16 changed files with 29 additions and 33 deletions
|
|
@ -139,7 +139,7 @@ async fn qcalc(regex: &mut Regex, expression: &str, decimal_comma: bool) -> Opti
|
|||
String::from("qalc command is not installed")
|
||||
} else {
|
||||
format!("qalc command failed to spawn: {}", why)
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,18 +11,18 @@ use tracing::{debug, error, info, warn};
|
|||
use crate::desktop_entries::utils::{get_description, is_session_cosmic};
|
||||
use crate::send;
|
||||
use futures::{
|
||||
channel::mpsc,
|
||||
future::{select, Either},
|
||||
StreamExt,
|
||||
channel::mpsc,
|
||||
future::{Either, select},
|
||||
};
|
||||
use pop_launcher::{
|
||||
async_stdin, async_stdout, json_input_stream, IconSource, PluginResponse, PluginSearchResult,
|
||||
Request,
|
||||
IconSource, PluginResponse, PluginSearchResult, Request, async_stdin, async_stdout,
|
||||
json_input_stream,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
use tokio::io::{AsyncWrite, AsyncWriteExt};
|
||||
|
||||
use self::toplevel_handler::{toplevel_handler, ToplevelAction};
|
||||
use self::toplevel_handler::{ToplevelAction, toplevel_handler};
|
||||
|
||||
pub async fn main() {
|
||||
let mut tx = async_stdout();
|
||||
|
|
@ -197,7 +197,7 @@ impl<W: AsyncWrite + Unpin> App<W> {
|
|||
let entry = fde::find_app_by_id(&self.desktop_entries, appid)
|
||||
.map(ToOwned::to_owned)
|
||||
.unwrap_or_else(|| fde::DesktopEntry::from_appid(appid.to_string()).to_owned());
|
||||
|
||||
|
||||
let icon_name = if let Some(icon) = entry.icon() {
|
||||
Cow::Owned(icon.to_owned())
|
||||
} else {
|
||||
|
|
@ -214,11 +214,7 @@ impl<W: AsyncWrite + Unpin> App<W> {
|
|||
..Default::default()
|
||||
});
|
||||
|
||||
send(
|
||||
&mut self.tx,
|
||||
response,
|
||||
)
|
||||
.await;
|
||||
send(&mut self.tx, response).await;
|
||||
}
|
||||
|
||||
send(&mut self.tx, PluginResponse::Finished).await;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ use cosmic_protocols::{
|
|||
use futures::channel::mpsc::UnboundedSender;
|
||||
use sctk::registry::{ProvidesRegistryState, RegistryState};
|
||||
use tracing::warn;
|
||||
use wayland_client::{globals::registry_queue_init, Connection, QueueHandle};
|
||||
use wayland_client::{Connection, QueueHandle, globals::registry_queue_init};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ToplevelAction {
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ impl<W: AsyncWrite + Unpin> App<W> {
|
|||
exec: entry.exec().map(|e| e.to_string()),
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
|
||||
send(tx, response).await;
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use zbus::Connection;
|
|||
use zvariant::{Signature, Type};
|
||||
|
||||
mod config;
|
||||
pub use config::{load, Config};
|
||||
pub use config::{Config, load};
|
||||
|
||||
const DEST: &str = "com.System76.PopShell";
|
||||
const PATH: &str = "/com/System76/PopShell";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
use futures::prelude::*;
|
||||
use pop_launcher::*;
|
||||
use recently_used_xbel::{parse_file, RecentlyUsed};
|
||||
use recently_used_xbel::{RecentlyUsed, parse_file};
|
||||
use slab::Slab;
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ impl App {
|
|||
None => return,
|
||||
};
|
||||
|
||||
use fork::{daemon, Fork};
|
||||
use fork::{Fork, daemon};
|
||||
|
||||
crate::send(&mut self.out, PluginResponse::Close).await;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use url::Url;
|
|||
|
||||
use pop_launcher::*;
|
||||
|
||||
pub use config::{load, Config, Definition};
|
||||
pub use config::{Config, Definition, load};
|
||||
use regex::Regex;
|
||||
|
||||
mod config;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue