Skip to content

Commit 81cd139

Browse files
committed
chore: update to Rust 1.85.0
1 parent 1a54eff commit 81cd139

File tree

11 files changed

+10
-14
lines changed

11 files changed

+10
-14
lines changed

crates/turborepo-api-client/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(async_closure)]
21
#![feature(error_generic_member_access)]
32
#![feature(assert_matches)]
43
#![deny(clippy::all)]

crates/turborepo-auth/src/auth/sso.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub async fn sso_login<T: Client + TokenClient + CacheClient>(
7878
api_client,
7979
sso_team,
8080
Some(valid_token_callback(
81-
"Existing Vercel token for {sso_team} found!",
81+
&format!("Existing Vercel token for {sso_team} found!"),
8282
color_config,
8383
)),
8484
)

crates/turborepo-auth/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ fn is_token_active(metadata: &ResponseTokenMetadata, current_time: u128) -> bool
296296
// Not all scopes have an expiration date, so we need to check if all of them
297297
// are expired. If there isn't an expiration date, we assume they are infinite
298298
// and therefore cannot be expired.
299-
let all_scopes_active =
300-
earliest_expiration.map_or(true, |expiration| current_time < expiration);
299+
let all_scopes_active = earliest_expiration.is_none_or(|expiration| current_time < expiration);
301300

302301
all_scopes_active && (active_at <= current_time)
303302
}

crates/turborepo-globwatch/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl GlobWatcher {
214214
// requester. flushes should not be considered as events.
215215
for flush_id in e
216216
.paths
217-
.extract_if(|p| p.starts_with(flush_dir.as_path()))
217+
.extract_if(.., |p| p.starts_with(flush_dir.as_path()))
218218
.filter_map(|p| {
219219
get_flush_id(
220220
p.strip_prefix(flush_dir.as_path())

crates/turborepo-lib/src/query/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ impl RepositoryQuery {
549549
let Ok(package) = package.as_ref() else {
550550
return true;
551551
};
552-
filter.as_ref().map_or(true, |f| f.check(&package.package))
552+
filter.as_ref().is_none_or(|f| f.check(&package.package))
553553
})
554554
.collect::<Result<Array<_>, _>>()?;
555555

crates/turborepo-lib/src/run/task_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ impl<'a> TaskName<'a> {
260260

261261
pub fn in_workspace(&self, workspace: &str) -> bool {
262262
self.task_id()
263-
.map_or(true, |task_id| task_id.package() == workspace)
263+
.is_none_or(|task_id| task_id.package() == workspace)
264264
}
265265

266266
pub fn into_owned(self) -> TaskName<'static> {

crates/turborepo-lib/src/task_graph/visitor/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'a> CommandProvider for PackageGraphCommandProvider<'a> {
105105
.package_json
106106
.scripts
107107
.get(task_id.task())
108-
.map_or(true, |script| script.is_empty())
108+
.is_none_or(|script| script.is_empty())
109109
{
110110
return Ok(None);
111111
}

crates/turborepo-lib/src/turbo_json/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ impl TryFrom<RawTaskDefinition> for TaskDefinition {
348348
fn try_from(raw_task: RawTaskDefinition) -> Result<Self, Error> {
349349
let outputs = raw_task.outputs.unwrap_or_default().try_into()?;
350350

351-
let cache = raw_task.cache.map_or(true, |c| c.into_inner());
351+
let cache = raw_task.cache.is_none_or(|c| c.into_inner());
352352
let interactive = raw_task
353353
.interactive
354354
.as_ref()

crates/turborepo-lockfiles/src/berry/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,7 @@ impl Lockfile for BerryLockfile {
440440
.locator_for_workspace_path(workspace_path)
441441
.ok_or_else(|| crate::Error::MissingWorkspace(workspace_path.to_string()))?;
442442

443-
let dependency = self
444-
.resolve_dependency(workspace_locator, name, version)
445-
.map_err(Error::from)?;
443+
let dependency = self.resolve_dependency(workspace_locator, name, version)?;
446444

447445
let Some(locator) = self.resolutions.get(&dependency) else {
448446
return Ok(None);

crates/turborepo-repository/src/package_graph/dep_splitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<'a> DependencyVersion<'a> {
186186
constraint
187187
.ok()
188188
.zip(version.ok())
189-
.map_or(true, |(constraint, version)| constraint.satisfies(&version))
189+
.is_none_or(|(constraint, version)| constraint.satisfies(&version))
190190
}
191191
}
192192
}

0 commit comments

Comments
 (0)