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
|
@ -1,15 +1,15 @@
|
|||
use crate::commit::get_messages;
|
||||
use crate::Oid;
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use crate::commit::get_messages;
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use collections::{HashMap, HashSet};
|
||||
use futures::AsyncWriteExt;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::process::Stdio;
|
||||
use std::{ops::Range, path::Path};
|
||||
use text::Rope;
|
||||
use time::macros::format_description;
|
||||
use time::OffsetDateTime;
|
||||
use time::UtcOffset;
|
||||
use time::macros::format_description;
|
||||
|
||||
pub use git2 as libgit;
|
||||
|
||||
|
@ -301,8 +301,8 @@ fn parse_git_blame(output: &str) -> Result<Vec<BlameEntry>> {
|
|||
mod tests {
|
||||
use std::path::PathBuf;
|
||||
|
||||
use super::parse_git_blame;
|
||||
use super::BlameEntry;
|
||||
use super::parse_git_blame;
|
||||
|
||||
fn read_test_data(filename: &str) -> String {
|
||||
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::Oid;
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ pub mod status;
|
|||
|
||||
pub use crate::hosting_provider::*;
|
||||
pub use crate::remote::*;
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
pub use git2 as libgit;
|
||||
use gpui::action_with_deprecated_aliases;
|
||||
use gpui::actions;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::status::GitStatus;
|
||||
use crate::{Oid, SHORT_SHA_LENGTH};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use anyhow::{Context as _, Result, anyhow};
|
||||
use collections::HashMap;
|
||||
use futures::future::BoxFuture;
|
||||
use futures::{select_biased, AsyncWriteExt, FutureExt as _};
|
||||
use futures::{AsyncWriteExt, FutureExt as _, select_biased};
|
||||
use git2::BranchType;
|
||||
use gpui::{AsyncApp, BackgroundExecutor, SharedString};
|
||||
use parking_lot::Mutex;
|
||||
|
@ -23,8 +23,8 @@ use std::{
|
|||
};
|
||||
use sum_tree::MapSeekTarget;
|
||||
use thiserror::Error;
|
||||
use util::command::{new_smol_command, new_std_command};
|
||||
use util::ResultExt;
|
||||
use util::command::{new_smol_command, new_std_command};
|
||||
use uuid::Uuid;
|
||||
|
||||
pub use askpass::{AskPassDelegate, AskPassResult, AskPassSession};
|
||||
|
@ -1843,16 +1843,19 @@ mod tests {
|
|||
.unwrap();
|
||||
let checkpoint2 = repo.checkpoint().await.unwrap();
|
||||
|
||||
assert!(!repo
|
||||
.compare_checkpoints(checkpoint1, checkpoint2.clone())
|
||||
.await
|
||||
.unwrap());
|
||||
assert!(
|
||||
!repo
|
||||
.compare_checkpoints(checkpoint1, checkpoint2.clone())
|
||||
.await
|
||||
.unwrap()
|
||||
);
|
||||
|
||||
let checkpoint3 = repo.checkpoint().await.unwrap();
|
||||
assert!(repo
|
||||
.compare_checkpoints(checkpoint2, checkpoint3)
|
||||
.await
|
||||
.unwrap());
|
||||
assert!(
|
||||
repo.compare_checkpoints(checkpoint2, checkpoint3)
|
||||
.await
|
||||
.unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::repository::RepoPath;
|
||||
use anyhow::{anyhow, Result};
|
||||
use anyhow::{Result, anyhow};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{path::Path, str::FromStr, sync::Arc};
|
||||
use util::ResultExt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue