mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-03 03:31:03 +02:00
refactor: fix new strict clippy warnings
This commit is contained in:
parent
d58d8952a8
commit
aaef3bf96c
8 changed files with 24 additions and 29 deletions
|
@ -208,10 +208,10 @@ impl Client {
|
|||
|
||||
impl WorkspaceClient for Client {
|
||||
fn focus(&self, id: String) -> Result<()> {
|
||||
let identifier = match id.parse::<i32>() {
|
||||
Ok(inum) => WorkspaceIdentifierWithSpecial::Id(inum),
|
||||
Err(_) => WorkspaceIdentifierWithSpecial::Name(&id),
|
||||
};
|
||||
let identifier = id.parse::<i32>().map_or_else(
|
||||
|_| WorkspaceIdentifierWithSpecial::Name(&id),
|
||||
WorkspaceIdentifierWithSpecial::Id,
|
||||
);
|
||||
|
||||
Dispatch::call(DispatchType::Workspace(identifier))?;
|
||||
Ok(())
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/// It is necessary to store macros in a separate file due to a compilation error.
|
||||
/// I believe this stems from the feature flags.
|
||||
/// Related issue: <https://github.com/rust-lang/rust/issues/81066>
|
||||
//! It is necessary to store macros in a separate file due to a compilation error.
|
||||
//! I believe this stems from the feature flags.
|
||||
//! Related issue: <https://github.com/rust-lang/rust/issues/81066>
|
||||
|
||||
// --- Data Control Device --- \\
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ struct BroadcastChannel<T>(broadcast::Sender<T>, Arc<Mutex<broadcast::Receiver<T
|
|||
|
||||
impl<T> From<(broadcast::Sender<T>, broadcast::Receiver<T>)> for BroadcastChannel<T> {
|
||||
fn from(value: (broadcast::Sender<T>, broadcast::Receiver<T>)) -> Self {
|
||||
BroadcastChannel(value.0, arc_mut!(value.1))
|
||||
Self(value.0, arc_mut!(value.1))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue