Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
build: Bump Rust version to 1.93 (#47358)
Piotr Osiewicz515a840e762b
diff --git a/Dockerfile-collab b/Dockerfile-collabindex 188e7daddfb..63359334906 100644--- a/Dockerfile-collab+++ b/Dockerfile-collab@@ -1,6 +1,6 @@# syntax = docker/dockerfile:1.2-FROM rust:1.92-bookworm as builder+FROM rust:1.93-bookworm as builderWORKDIR appCOPY . .diff --git a/crates/gpui/src/elements/list.rs b/crates/gpui/src/elements/list.rsindex 7c292b40a15..26cf14a8d39 100644--- a/crates/gpui/src/elements/list.rs+++ b/crates/gpui/src/elements/list.rs@@ -526,8 +526,12 @@ impl ListState {}impl StateInner {- fn visible_range(&self, height: Pixels, scroll_top: &ListOffset) -> Range<usize> {- let mut cursor = self.items.cursor::<ListItemSummary>(());+ fn visible_range(+ items: &SumTree<ListItem>,+ height: Pixels,+ scroll_top: &ListOffset,+ ) -> Range<usize> {+ let mut cursor = items.cursor::<ListItemSummary>(());cursor.seek(&Count(scroll_top.item_ix), Bias::Right);let start_y = cursor.start().height + scroll_top.offset_in_item;cursor.seek_forward(&Height(start_y + height), Bias::Left);@@ -570,9 +574,9 @@ impl StateInner {});}- if self.scroll_handler.is_some() {- let visible_range = self.visible_range(height, scroll_top);- self.scroll_handler.as_mut().unwrap()(+ if let Some(handler) = self.scroll_handler.as_mut() {+ let visible_range = Self::visible_range(&self.items, height, scroll_top);+ handler(&ListScrollEvent {visible_range,count: self.items.summary().count,diff --git a/crates/gpui/src/key_dispatch.rs b/crates/gpui/src/key_dispatch.rsindex 2f0848660ec..73d77f71d24 100644--- a/crates/gpui/src/key_dispatch.rs+++ b/crates/gpui/src/key_dispatch.rs@@ -199,8 +199,8 @@ impl DispatchTree {if let Some(context) = node.context.clone() {self.context_stack.push(context);}- if node.view_id.is_some() {- self.view_stack.push(node.view_id.unwrap());+ if let Some(view_id) = node.view_id {+ self.view_stack.push(view_id);}self.node_stack.push(node_id);current_node_id = node.parent;diff --git a/crates/remote/src/transport/docker.rs b/crates/remote/src/transport/docker.rsindex d2c7dc74bff..713e5327040 100644--- a/crates/remote/src/transport/docker.rs+++ b/crates/remote/src/transport/docker.rs@@ -143,11 +143,9 @@ impl DockerExecConnection {commit: Option<AppCommitSha>,cx: &mut AsyncApp,) -> Result<Arc<RelPath>> {- let remote_platform = if self.remote_platform.is_some() {- self.remote_platform.unwrap()- } else {- anyhow::bail!("No remote platform defined; cannot proceed.")- };+ let remote_platform = self+ .remote_platform+ .context("No remote platform defined; cannot proceed.")?;let version_str = match release_channel {ReleaseChannel::Nightly => {diff --git a/crates/settings_ui/src/components/section_items.rs b/crates/settings_ui/src/components/section_items.rsindex 69559d24f44..9c98a80737f 100644--- a/crates/settings_ui/src/components/section_items.rs+++ b/crates/settings_ui/src/components/section_items.rs@@ -40,11 +40,11 @@ impl RenderOnce for SettingsSectionHeader {.when(!self.no_padding, |this| this.px_8()).gap_1p5().map(|this| {- if self.icon.is_some() {+ if let Some(icon) = self.icon {this.child(h_flex().gap_1p5()- .child(Icon::new(self.icon.unwrap()).color(Color::Muted))+ .child(Icon::new(icon).color(Color::Muted)).child(label),)} else {diff --git a/crates/ui/src/components/modal.rs b/crates/ui/src/components/modal.rsindex 85565f54885..6d273dde4fc 100644--- a/crates/ui/src/components/modal.rs+++ b/crates/ui/src/components/modal.rs@@ -159,10 +159,10 @@ impl RenderOnce for ModalHeader {fn render(self, _window: &mut Window, cx: &mut App) -> impl IntoElement {let mut children = self.children;- if self.headline.is_some() {+ if let Some(headline) = self.headline {children.insert(0,- Headline::new(self.headline.unwrap())+ Headline::new(headline).size(HeadlineSize::XSmall).color(Color::Muted).into_any_element(),diff --git a/crates/vim/src/command.rs b/crates/vim/src/command.rsindex 5f53ebaec68..e320790a9b9 100644--- a/crates/vim/src/command.rs+++ b/crates/vim/src/command.rs@@ -1166,8 +1166,8 @@ impl VimCommand {has_bang,has_space: _,} = self.get_parsed_query(query.to_string())?;- let action = if has_bang && self.bang_action.is_some() {- self.bang_action.as_ref().unwrap().boxed_clone()+ let action = if has_bang && let Some(bang_action) = self.bang_action.as_ref() {+ bang_action.boxed_clone()} else if let Some(action) = self.action.as_ref() {action.boxed_clone()} else if let Some(action_name) = self.action_name {diff --git a/crates/vim/src/vim.rs b/crates/vim/src/vim.rsindex 205b55f01d9..860af285c42 100644--- a/crates/vim/src/vim.rs+++ b/crates/vim/src/vim.rs@@ -1781,14 +1781,16 @@ impl Vim {let newest = editor.read(cx).selections.newest_anchor().clone();let is_multicursor = editor.read(cx).selections.count() > 1;if self.mode == Mode::Insert && self.current_tx.is_some() {- if self.current_anchor.is_none() {+ if let Some(current_anchor) = &self.current_anchor {+ if current_anchor != &newest+ && let Some(tx_id) = self.current_tx.take()+ {+ self.update_editor(cx, |_, editor, cx| {+ editor.group_until_transaction(tx_id, cx)+ });+ }+ } else {self.current_anchor = Some(newest);- } else if self.current_anchor.as_ref().unwrap() != &newest- && let Some(tx_id) = self.current_tx.take()- {- self.update_editor(cx, |_, editor, cx| {- editor.group_until_transaction(tx_id, cx)- });}} else if self.mode == Mode::Normal && newest.start != newest.end {if matches!(newest.goal, SelectionGoal::HorizontalRange { .. }) {diff --git a/flake.lock b/flake.lockindex 561919d5745..5bfb03ffd1a 100644--- a/flake.lock+++ b/flake.lock@@ -2,11 +2,11 @@"nodes": {"crane": {"locked": {- "lastModified": 1765145449,- "narHash": "sha256-aBVHGWWRzSpfL++LubA0CwOOQ64WNLegrYHwsVuVN7A=",+ "lastModified": 1768873933,+ "narHash": "sha256-CfyzdaeLNGkyAHp3kT5vjvXhA1pVVK7nyDziYxCPsNk=","owner": "ipetkov","repo": "crane",- "rev": "69f538cdce5955fcd47abfed4395dc6d5194c1c5",+ "rev": "0bda7e7d005ccb5522a76d11ccfbf562b71953ca","type": "github"},"original": {@@ -17,11 +17,11 @@},"flake-compat": {"locked": {- "lastModified": 1765121682,- "narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",+ "lastModified": 1767039857,+ "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=","owner": "edolstra","repo": "flake-compat",- "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",+ "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab","type": "github"},"original": {@@ -32,11 +32,11 @@},"nixpkgs": {"locked": {- "lastModified": 1765772535,- "narHash": "sha256-I715zWsdVZ+CipmLtoCAeNG0etQywiWRE5PaWntnaYk=",- "rev": "09b8fda8959d761445f12b55f380d90375a1d6bb",+ "lastModified": 1768875095,+ "narHash": "sha256-XH6awru9NnBc/m+2YhRNT8r1PAKEiPGF3gs//F3ods0=",+ "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0","type": "tarball",- "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre911985.09b8fda8959d/nixexprs.tar.xz"+ "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre930822.ed142ab1b3a0/nixexprs.tar.xz"},"original": {"type": "tarball",@@ -53,14 +53,16 @@},"rust-overlay": {"inputs": {- "nixpkgs": ["nixpkgs"]+ "nixpkgs": [+ "nixpkgs"+ ]},"locked": {- "lastModified": 1765465581,- "narHash": "sha256-fCXT0aZXmTalM3NPCTedVs9xb0egBG5BOZkcrYo5PGE=",+ "lastModified": 1769136478,+ "narHash": "sha256-8UNd5lmGf8phCr/aKxagJ4kNsF0pCHLish2G4ZKCFFY=","owner": "oxalica","repo": "rust-overlay",- "rev": "99cc5667eece98bb35dcf35f7e511031a8b7a125",+ "rev": "470ee44393bb19887056b557ea2c03fc5230bd5a","type": "github"},"original": {diff --git a/rust-toolchain.toml b/rust-toolchain.tomlindex e7cc22421d7..3d058f5212a 100644--- a/rust-toolchain.toml+++ b/rust-toolchain.toml@@ -1,5 +1,5 @@[toolchain]-channel = "1.92"+channel = "1.93"profile = "minimal"components = [ "rustfmt", "clippy" ]targets = [