Dockerfile-collab 🔗
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
-FROM rust:1.92-bookworm as builder
+FROM rust:1.93-bookworm as builder
WORKDIR app
COPY . .
Piotr Osiewicz and Jakub Konka created
Release Notes:
- N/A
---------
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
Dockerfile-collab | 2
crates/gpui/src/elements/list.rs | 14 ++++--
crates/gpui/src/key_dispatch.rs | 4 +-
crates/remote/src/transport/docker.rs | 8 +--
crates/settings_ui/src/components/section_items.rs | 4 +-
crates/ui/src/components/modal.rs | 4 +-
crates/vim/src/command.rs | 4 +-
crates/vim/src/vim.rs | 16 ++++---
flake.lock | 30 ++++++++-------
rust-toolchain.toml | 2
10 files changed, 47 insertions(+), 41 deletions(-)
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.2
-FROM rust:1.92-bookworm as builder
+FROM rust:1.93-bookworm as builder
WORKDIR app
COPY . .
@@ -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,
@@ -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;
@@ -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 => {
@@ -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 {
@@ -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(),
@@ -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 {
@@ -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 { .. }) {
@@ -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": {
@@ -1,5 +1,5 @@
[toolchain]
-channel = "1.92"
+channel = "1.93"
profile = "minimal"
components = [ "rustfmt", "clippy" ]
targets = [