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:
parent
d50905e000
commit
dc64ec9cc8
802 changed files with 3775 additions and 3662 deletions
|
@ -2,7 +2,7 @@ use std::path::Path;
|
|||
|
||||
use anyhow::Result;
|
||||
use async_zip::base::read::stream::ZipFileReader;
|
||||
use futures::{io::BufReader, AsyncRead};
|
||||
use futures::{AsyncRead, io::BufReader};
|
||||
|
||||
pub async fn extract_zip<R: AsyncRead + Unpin>(destination: &Path, reader: R) -> Result<()> {
|
||||
let mut reader = ZipFileReader::new(BufReader::new(reader));
|
||||
|
@ -35,8 +35,8 @@ pub async fn extract_zip<R: AsyncRead + Unpin>(destination: &Path, reader: R) ->
|
|||
mod tests {
|
||||
use std::path::PathBuf;
|
||||
|
||||
use async_zip::base::write::ZipFileWriter;
|
||||
use async_zip::ZipEntryBuilder;
|
||||
use async_zip::base::write::ZipFileWriter;
|
||||
use futures::AsyncWriteExt;
|
||||
use smol::io::Cursor;
|
||||
use tempfile::TempDir;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
mod archive;
|
||||
|
||||
use anyhow::{anyhow, bail, Context, Result};
|
||||
use anyhow::{Context, Result, anyhow, bail};
|
||||
pub use archive::extract_zip;
|
||||
use async_compression::futures::bufread::GzipDecoder;
|
||||
use async_tar::Archive;
|
||||
|
@ -279,10 +279,12 @@ impl ManagedNodeRuntime {
|
|||
|
||||
async fn node_environment_path(&self) -> Result<OsString> {
|
||||
let node_binary = self.installation_path.join(Self::NODE_PATH);
|
||||
let mut env_path = vec![node_binary
|
||||
.parent()
|
||||
.expect("invalid node binary path")
|
||||
.to_path_buf()];
|
||||
let mut env_path = vec![
|
||||
node_binary
|
||||
.parent()
|
||||
.expect("invalid node binary path")
|
||||
.to_path_buf(),
|
||||
];
|
||||
|
||||
if let Some(existing_path) = std::env::var_os("PATH") {
|
||||
let mut paths = std::env::split_paths(&existing_path).collect::<Vec<_>>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue