Merge pull request #2432 from hongqitai/style/fix-clippys
style: fix clippy warnings and run fmt
This commit is contained in:
@@ -364,9 +364,8 @@ fn update_http_client(proxy: Option<&Proxy>) -> Result<reqwest::blocking::Client
|
||||
}
|
||||
|
||||
fn latest_release_tag(channel: ReleaseChannel, proxy: Option<&Proxy>) -> Result<String> {
|
||||
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.
|
||||
|
||||
@@ -164,7 +164,7 @@ async fn upload_gist(path: &Path) -> Result<String, String> {
|
||||
"gist",
|
||||
"create",
|
||||
"--public",
|
||||
&path_owned.to_string_lossy().to_string(),
|
||||
path_owned.to_string_lossy().as_ref(),
|
||||
"--filename",
|
||||
"session-export.html",
|
||||
"--desc",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user