Bump Rust to 1.90 (#38436)
Release Notes: - N/A --------- Co-authored-by: Nia Espera <nia@zed.dev> Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
This commit is contained in:
co-authored by
Nia Espera
Julia Ryan
parent
46d19d8a47
commit
a90abb1009
@@ -1129,8 +1129,3 @@ async fn max_order(parent_path: &str, tx: &TransactionHandle) -> Result<i32> {
|
||||
enum QueryIds {
|
||||
Id,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
|
||||
enum QueryUserIds {
|
||||
UserId,
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ use db::{
|
||||
use serde::{Deserialize, Serialize};
|
||||
use time::OffsetDateTime;
|
||||
|
||||
#[cfg(test)]
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
|
||||
pub(crate) struct SerializedCommandInvocation {
|
||||
pub(crate) command_name: String,
|
||||
@@ -39,6 +40,7 @@ impl Column for SerializedCommandUsage {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl Column for SerializedCommandInvocation {
|
||||
fn column(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> {
|
||||
let (command_name, next_index): (String, i32) = Column::column(statement, start_index)?;
|
||||
@@ -84,8 +86,9 @@ impl CommandPaletteDB {
|
||||
.await
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
query! {
|
||||
pub fn get_last_invoked(command: &str) -> Result<Option<SerializedCommandInvocation>> {
|
||||
pub(crate) fn get_last_invoked(command: &str) -> Result<Option<SerializedCommandInvocation>> {
|
||||
SELECT
|
||||
command_name,
|
||||
user_query,
|
||||
|
||||
@@ -438,13 +438,3 @@ struct RawRequest {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
params: Option<Box<serde_json::value::RawValue>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct RawResponse {
|
||||
jsonrpc: &'static str,
|
||||
id: RequestId,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
error: Option<crate::client::Error>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
result: Option<Box<serde_json::value::RawValue>>,
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ wasmtime::component::bindgen!({
|
||||
});
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.0.6/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ wasmtime::component::bindgen!({
|
||||
pub use self::zed::extension::*;
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.2.0/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ wasmtime::component::bindgen!({
|
||||
});
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.3.0/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ wasmtime::component::bindgen!({
|
||||
});
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.4.0/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ wasmtime::component::bindgen!({
|
||||
});
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.5.0/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ wasmtime::component::bindgen!({
|
||||
pub use self::zed::extension::*;
|
||||
|
||||
mod settings {
|
||||
#![allow(dead_code)]
|
||||
include!(concat!(env!("OUT_DIR"), "/since_v0.6.0/settings.rs"));
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,6 @@ use ui::{
|
||||
};
|
||||
use workspace::dock::DockPosition;
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
pub struct ScrollbarSettingsContent {
|
||||
/// When to show the scrollbar in the git panel.
|
||||
///
|
||||
/// Default: inherits editor scrollbar settings
|
||||
pub show: Option<Option<ShowScrollbar>>,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
|
||||
pub struct ScrollbarSettings {
|
||||
pub show: Option<ShowScrollbar>,
|
||||
|
||||
@@ -238,7 +238,7 @@ impl RenderOnce for TableRow {
|
||||
.flex_row()
|
||||
.border_b_1()
|
||||
.border_color(rgb(0xE0E0E0))
|
||||
.bg(if self.ix % 2 == 0 {
|
||||
.bg(if self.ix.is_multiple_of(2) {
|
||||
rgb(0xFFFFFF)
|
||||
} else {
|
||||
rgb(0xFAFAFA)
|
||||
|
||||
@@ -634,15 +634,15 @@ struct CacheKeyRef<'a> {
|
||||
force_width: Option<Pixels>,
|
||||
}
|
||||
|
||||
impl PartialEq for (dyn AsCacheKeyRef + '_) {
|
||||
impl PartialEq for dyn AsCacheKeyRef + '_ {
|
||||
fn eq(&self, other: &dyn AsCacheKeyRef) -> bool {
|
||||
self.as_cache_key_ref() == other.as_cache_key_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for (dyn AsCacheKeyRef + '_) {}
|
||||
impl Eq for dyn AsCacheKeyRef + '_ {}
|
||||
|
||||
impl Hash for (dyn AsCacheKeyRef + '_) {
|
||||
impl Hash for dyn AsCacheKeyRef + '_ {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.as_cache_key_ref().hash(state)
|
||||
}
|
||||
|
||||
@@ -3579,7 +3579,7 @@ impl ProjectPanel {
|
||||
let entry_range = range.start.saturating_sub(ix)..end_ix - ix;
|
||||
let entries = visible
|
||||
.index
|
||||
.get_or_init(|| visible.entries.iter().map(|e| (e.path.clone())).collect());
|
||||
.get_or_init(|| visible.entries.iter().map(|e| e.path.clone()).collect());
|
||||
let base_index = ix + entry_range.start;
|
||||
for (i, entry) in visible.entries[entry_range].iter().enumerate() {
|
||||
let global_index = base_index + i;
|
||||
@@ -3623,7 +3623,7 @@ impl ProjectPanel {
|
||||
let entry_range = range.start.saturating_sub(ix)..end_ix - ix;
|
||||
let entries = visible
|
||||
.index
|
||||
.get_or_init(|| visible.entries.iter().map(|e| (e.path.clone())).collect());
|
||||
.get_or_init(|| visible.entries.iter().map(|e| e.path.clone()).collect());
|
||||
for entry in visible.entries[entry_range].iter() {
|
||||
let status = git_status_setting
|
||||
.then_some(entry.git_summary)
|
||||
@@ -4968,7 +4968,7 @@ impl ProjectPanel {
|
||||
visible_worktree
|
||||
.entries
|
||||
.iter()
|
||||
.map(|e| (e.path.clone()))
|
||||
.map(|e| e.path.clone())
|
||||
.collect()
|
||||
});
|
||||
|
||||
|
||||
@@ -6,13 +6,6 @@ use crate::{
|
||||
DebugScenario, DebugTaskFile, EnvVariableReplacer, TcpArgumentsTemplate, VariableName,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
enum Request {
|
||||
Launch,
|
||||
Attach,
|
||||
}
|
||||
|
||||
// TODO support preLaunchTask linkage with other tasks
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
@@ -23,7 +23,6 @@ derive_more.workspace = true
|
||||
fs.workspace = true
|
||||
futures.workspace = true
|
||||
gpui.workspace = true
|
||||
indexmap.workspace = true
|
||||
log.workspace = true
|
||||
palette = { workspace = true, default-features = false, features = ["std"] }
|
||||
parking_lot.workspace = true
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use gpui::{FontStyle, FontWeight, HighlightStyle, Hsla};
|
||||
use indexmap::IndexMap;
|
||||
use palette::FromColor;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use settings::{AccentContent, PlayerColorContent};
|
||||
pub use settings::{FontWeightContent, WindowBackgroundContent};
|
||||
|
||||
use crate::{StatusColorsRefinement, ThemeColorsRefinement};
|
||||
@@ -49,30 +47,6 @@ pub struct ThemeContent {
|
||||
pub style: settings::ThemeStyleContent,
|
||||
}
|
||||
|
||||
/// The content of a serialized theme.
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize, JsonSchema, PartialEq)]
|
||||
#[serde(default)]
|
||||
pub struct ThemeStyleContent {
|
||||
#[serde(default, rename = "background.appearance")]
|
||||
pub window_background_appearance: Option<settings::WindowBackgroundContent>,
|
||||
|
||||
#[serde(default)]
|
||||
pub accents: Vec<AccentContent>,
|
||||
|
||||
#[serde(flatten, default)]
|
||||
pub colors: settings::ThemeColorsContent,
|
||||
|
||||
#[serde(flatten, default)]
|
||||
pub status: settings::StatusColorsContent,
|
||||
|
||||
#[serde(default)]
|
||||
pub players: Vec<PlayerColorContent>,
|
||||
|
||||
/// The styles for syntax nodes.
|
||||
#[serde(default)]
|
||||
pub syntax: IndexMap<String, settings::HighlightStyleContent>,
|
||||
}
|
||||
|
||||
/// Returns the syntax style overrides in the [`ThemeContent`].
|
||||
pub fn syntax_overrides(this: &settings::ThemeStyleContent) -> Vec<(String, HighlightStyle)> {
|
||||
this.syntax
|
||||
|
||||
@@ -19,37 +19,6 @@ use crate::vscode::VsCodeThemeConverter;
|
||||
|
||||
const ZED_THEME_SCHEMA_URL: &str = "https://zed.dev/schema/themes/v0.2.0.json";
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
struct FamilyMetadata {
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub name: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub author: String,
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub themes: Vec<ThemeMetadata>,
|
||||
|
||||
/// Overrides for specific syntax tokens.
|
||||
///
|
||||
/// Use this to ensure certain Zed syntax tokens are matched
|
||||
/// to an exact set of scopes when it is not otherwise possible
|
||||
/// to rely on the default mappings in the theme importer.
|
||||
#[serde(default)]
|
||||
#[expect(
|
||||
unused,
|
||||
reason = "This field was found to be unused with serde library bump; it's left as is due to insufficient context on PO's side, but it *may* be fine to remove"
|
||||
)]
|
||||
pub syntax: IndexMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ThemeAppearanceJson {
|
||||
|
||||
@@ -1039,7 +1039,7 @@ fn text_object(
|
||||
.text_object_ranges(offset..offset, TreeSitterOptions::default())
|
||||
.filter_map(|(r, m)| if m == target { Some(r) } else { None })
|
||||
.collect();
|
||||
matches.sort_by_key(|r| (r.end - r.start));
|
||||
matches.sort_by_key(|r| r.end - r.start);
|
||||
if let Some(buffer_range) = matches.first() {
|
||||
let range = excerpt.map_range_from_buffer(buffer_range.clone());
|
||||
return Some(range.start.to_display_point(map)..range.end.to_display_point(map));
|
||||
@@ -1050,7 +1050,7 @@ fn text_object(
|
||||
.text_object_ranges(offset..offset, TreeSitterOptions::default())
|
||||
.filter_map(|(r, m)| if m == around { Some(r) } else { None })
|
||||
.collect();
|
||||
matches.sort_by_key(|r| (r.end - r.start));
|
||||
matches.sort_by_key(|r| r.end - r.start);
|
||||
let around_range = matches.first()?;
|
||||
|
||||
let mut matches: Vec<Range<usize>> = buffer
|
||||
|
||||
Reference in New Issue
Block a user