chore: Bump Rust version to 1.80 (#15186)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2024-07-25 22:48:42 +02:00
committed by GitHub
parent f291677d40
commit 0d5de88c4b
22 changed files with 43 additions and 67 deletions
+4 -14
View File
@@ -408,6 +408,7 @@ impl EditorActionId {
type BackgroundHighlight = (fn(&ThemeColors) -> Hsla, Arc<[Range<Anchor>]>);
type GutterHighlight = (fn(&AppContext) -> Hsla, Arc<[Range<Anchor>]>);
#[derive(Default)]
struct ScrollbarMarkerState {
scrollbar_size: Size<Pixels>,
dirty: bool,
@@ -421,17 +422,6 @@ impl ScrollbarMarkerState {
}
}
impl Default for ScrollbarMarkerState {
fn default() -> Self {
Self {
scrollbar_size: Size::default(),
dirty: false,
markers: Arc::from([]),
pending_refresh: None,
}
}
}
#[derive(Clone, Debug)]
struct RunnableTasks {
templates: Vec<(TaskSourceKind, TaskTemplate)>,
@@ -5730,7 +5720,7 @@ impl Editor {
self.transact(cx, |this, cx| {
this.buffer.update(cx, |buffer, cx| {
let empty_str: Arc<str> = "".into();
let empty_str: Arc<str> = Arc::default();
buffer.edit(
deletion_ranges
.into_iter()
@@ -5796,7 +5786,7 @@ impl Editor {
self.transact(cx, |this, cx| {
let buffer = this.buffer.update(cx, |buffer, cx| {
let empty_str: Arc<str> = "".into();
let empty_str: Arc<str> = Arc::default();
buffer.edit(
edit_ranges
.into_iter()
@@ -8097,7 +8087,7 @@ impl Editor {
let mut selection_edit_ranges = Vec::new();
let mut last_toggled_row = None;
let snapshot = this.buffer.read(cx).read(cx);
let empty_str: Arc<str> = "".into();
let empty_str: Arc<str> = Arc::default();
let mut suffixes_inserted = Vec::new();
fn comment_prefix_range(
+2 -2
View File
@@ -44,7 +44,7 @@ impl SelectionsCollection {
buffer,
next_selection_id: 1,
line_mode: false,
disjoint: Arc::from([]),
disjoint: Arc::default(),
pending: Some(PendingSelection {
selection: Selection {
id: 0,
@@ -398,7 +398,7 @@ impl<'a> MutableSelectionsCollection<'a> {
}
pub fn clear_disjoint(&mut self) {
self.collection.disjoint = Arc::from([]);
self.collection.disjoint = Arc::default();
}
pub fn delete(&mut self, selection_id: usize) {
@@ -327,7 +327,7 @@ impl EditorTestContext {
.background_highlights
.get(&TypeId::of::<Tag>())
.map(|h| h.1.clone())
.unwrap_or_else(|| Arc::from([]))
.unwrap_or_else(|| Arc::default())
.into_iter()
.map(|range| range.to_offset(&snapshot.buffer_snapshot))
.collect()