1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-04 04:01:03 +02:00

refactor: fix new strict clippy warnings

This commit is contained in:
Jake Stanger 2024-02-01 22:39:43 +00:00
parent d58d8952a8
commit aaef3bf96c
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
8 changed files with 24 additions and 29 deletions

View file

@ -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(())