chore: Bump Rust edition to 2024 (#27800)

Follow-up to https://github.com/zed-industries/zed/pull/27791

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-03-31 20:55:27 +02:00 committed by GitHub
parent d50905e000
commit dc64ec9cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
802 changed files with 3775 additions and 3662 deletions

View file

@ -8,7 +8,7 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;
use ::lsp::LanguageServerName;
use anyhow::{anyhow, bail, Context as _, Result};
use anyhow::{Context as _, Result, anyhow, bail};
use async_trait::async_trait;
use fs::normalize_path;
use gpui::{App, Task};

View file

@ -1,12 +1,12 @@
use crate::{
parse_wasm_extension_version, ExtensionLibraryKind, ExtensionManifest, GrammarManifestEntry,
ExtensionLibraryKind, ExtensionManifest, GrammarManifestEntry, parse_wasm_extension_version,
};
use anyhow::{anyhow, bail, Context as _, Result};
use anyhow::{Context as _, Result, anyhow, bail};
use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive;
use convert_case::{Case, Casing as _};
use futures::io::BufReader;
use futures::AsyncReadExt;
use futures::io::BufReader;
use http_client::{self, AsyncBody, HttpClient};
use serde::Deserialize;
use std::{

View file

@ -1,4 +1,4 @@
use anyhow::{anyhow, bail, Context as _, Result};
use anyhow::{Context as _, Result, anyhow, bail};
use collections::{BTreeMap, HashMap};
use fs::Fs;
use language::LanguageName;
@ -347,9 +347,11 @@ mod tests {
assert!(manifest.allow_exec("cargo", &["test"]).is_ok());
assert!(manifest.allow_exec("cargo", &["test", "--all"]).is_ok());
assert!(manifest
.allow_exec("cargo", &["test", "--all", "--no-fail-fast"])
.is_ok());
assert!(
manifest
.allow_exec("cargo", &["test", "--all", "--no-fail-fast"])
.is_ok()
);
assert!(manifest.allow_exec("cargo", &["build"]).is_err()); // wrong first arg
}
@ -365,12 +367,16 @@ mod tests {
assert!(manifest.allow_exec("docker", &["run", "nginx"]).is_ok());
assert!(manifest.allow_exec("docker", &["run"]).is_err());
assert!(manifest
.allow_exec("docker", &["run", "ubuntu", "bash"])
.is_ok());
assert!(manifest
.allow_exec("docker", &["run", "alpine", "sh", "-c", "echo hello"])
.is_ok());
assert!(
manifest
.allow_exec("docker", &["run", "ubuntu", "bash"])
.is_ok()
);
assert!(
manifest
.allow_exec("docker", &["run", "alpine", "sh", "-c", "echo hello"])
.is_ok()
);
assert!(manifest.allow_exec("docker", &["ps"]).is_err()); // wrong first arg
}
}