diff --git a/crates/cli/src/update.rs b/crates/cli/src/update.rs index ed228e47..2c90422b 100644 --- a/crates/cli/src/update.rs +++ b/crates/cli/src/update.rs @@ -364,9 +364,8 @@ fn update_http_client(proxy: Option<&Proxy>) -> Result) -> Result { - match fetch_latest_release(channel, proxy)? { - FetchedRelease { release, .. } => Ok(release.tag_name), - } + let FetchedRelease { release, .. } = fetch_latest_release(channel, proxy)?; + Ok(release.tag_name) } /// Fetch the latest release metadata from GitHub. diff --git a/crates/tui/src/commands/share.rs b/crates/tui/src/commands/share.rs index 43e42ec9..61f1dce6 100644 --- a/crates/tui/src/commands/share.rs +++ b/crates/tui/src/commands/share.rs @@ -164,7 +164,7 @@ async fn upload_gist(path: &Path) -> Result { "gist", "create", "--public", - &path_owned.to_string_lossy().to_string(), + path_owned.to_string_lossy().as_ref(), "--filename", "session-export.html", "--desc", diff --git a/crates/tui/src/tools/plugin.rs b/crates/tui/src/tools/plugin.rs index b373d85e..0e53670c 100644 --- a/crates/tui/src/tools/plugin.rs +++ b/crates/tui/src/tools/plugin.rs @@ -436,10 +436,10 @@ pub fn scan_plugin_dir(dir: &Path) -> Vec<(PathBuf, PluginMetadata)> { if path.is_dir() { continue; } - if let Some(name) = path.file_name().and_then(|n| n.to_str()) { - if name.starts_with('.') || name == "README.md" { - continue; - } + if let Some(name) = path.file_name().and_then(|n| n.to_str()) + && (name.starts_with('.') || name == "README.md") + { + continue; } // Try to parse frontmatter