Skip to content

Commit e5aea46

Browse files
committed
chore: update to Rust 1.87.0
1 parent f1f17aa commit e5aea46

File tree

13 files changed

+21
-26
lines changed

13 files changed

+21
-26
lines changed

crates/turborepo-filewatch/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
2323
#![deny(clippy::all)]
2424
#![allow(clippy::mutable_key_type)]
25+
#![allow(clippy::result_large_err)]
2526
#![feature(assert_matches)]
2627

2728
use std::{

crates/turborepo-globwatch/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
unused_must_use,
1919
unsafe_code
2020
)]
21-
#![feature(extract_if)]
2221

2322
use std::{
2423
collections::HashMap,

crates/turborepo-lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(assert_matches)]
22
#![feature(box_patterns)]
33
#![feature(error_generic_member_access)]
4-
#![feature(hash_extract_if)]
54
#![feature(once_cell_try)]
65
#![feature(try_blocks)]
76
#![feature(impl_trait_in_assoc_type)]
@@ -10,6 +9,7 @@
109
#![allow(clippy::needless_pass_by_ref_mut)]
1110
// Code generated by tonic-build don't follow this lint
1211
#![allow(clippy::needless_lifetimes)]
12+
#![allow(clippy::result_large_err)]
1313
#![allow(dead_code)]
1414

1515
mod child;

crates/turborepo-lib/src/package_changes_watcher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl PackageChangesWatcher {
7474
enum ChangedFiles {
7575
All,
7676
// Trie doesn't support PathBuf as a key on Windows, so we need to use `String`
77-
Some(Trie<String, ()>),
77+
Some(Box<Trie<String, ()>>),
7878
}
7979

8080
impl ChangedFiles {
@@ -88,7 +88,7 @@ impl ChangedFiles {
8888

8989
impl Default for ChangedFiles {
9090
fn default() -> Self {
91-
ChangedFiles::Some(Trie::new())
91+
ChangedFiles::Some(Box::new(Trie::new()))
9292
}
9393
}
9494

crates/turborepo-process/src/child.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl ChildHandle {
138138
.openpty(size)
139139
.map_err(|err| match err.downcast() {
140140
Ok(err) => err,
141-
Err(err) => io::Error::new(io::ErrorKind::Other, err),
141+
Err(err) => io::Error::other(err),
142142
})?;
143143

144144
let controller = pair.master;
@@ -168,7 +168,7 @@ impl ChildHandle {
168168
.spawn_command(command)
169169
.map_err(|err| match err.downcast() {
170170
Ok(err) => err,
171-
Err(err) => io::Error::new(io::ErrorKind::Other, err),
171+
Err(err) => io::Error::other(err),
172172
})?;
173173

174174
let pid = child.process_id();

crates/turborepo-repository/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![feature(assert_matches)]
22
#![feature(error_generic_member_access)]
3+
#![allow(clippy::result_large_err)]
34

45
pub mod change_mapper;
56
pub mod discovery;

crates/turborepo-scm/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![feature(io_error_more)]
33
#![feature(assert_matches)]
44
#![deny(clippy::all)]
5+
#![allow(clippy::result_large_err)]
56

67
//! Turborepo's library for interacting with source control management (SCM).
78
//! Currently we only support git. We use SCM for finding changed files,

crates/turborepo-ui/src/color_selector.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@ impl ColorSelector {
3838
return style;
3939
}
4040

41-
let color = {
42-
self.inner
43-
.write()
44-
.expect("lock poisoned")
45-
.insert_color(key.to_string())
46-
};
47-
48-
color
41+
self.inner
42+
.write()
43+
.expect("lock poisoned")
44+
.insert_color(key.to_string())
4945
}
5046

5147
pub fn prefix_with_color(&self, cache_key: &str, prefix: &str) -> StyledObject<String> {

crates/turborepo-ui/src/sender.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl std::io::Write for TaskSender {
146146

147147
self.handle
148148
.output(task, buf.to_vec())
149-
.map_err(|_| std::io::Error::new(std::io::ErrorKind::Other, "receiver dropped"))?;
149+
.map_err(|_| std::io::Error::other("receiver dropped"))?;
150150
Ok(buf.len())
151151
}
152152

crates/turborepo-vt100/src/grid.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -820,11 +820,7 @@ impl Grid {
820820
let in_scroll_region = self.in_scroll_region();
821821
// need to account for clamping by both row_clamp_top and by
822822
// saturating_sub
823-
let extra_lines = if count > self.pos.row {
824-
count - self.pos.row
825-
} else {
826-
0
827-
};
823+
let extra_lines = count.saturating_sub(self.pos.row);
828824
self.pos.row = self.pos.row.saturating_sub(count);
829825
let lines = self.row_clamp_top(in_scroll_region);
830826
self.scroll_down(lines + extra_lines);

0 commit comments

Comments
 (0)