Skip to content

Commit

Permalink
chore: fix clippy lints from rust 1.81.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ognevny committed Sep 13, 2024
1 parent 6d18865 commit 67f223c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crates/turborepo-lib/src/shim/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn spawn_npx_turbo(

let mut command = process::Command::new(npx_path);
command.arg("-y");
command.arg(&format!("turbo@{turbo_version}"));
command.arg(format!("turbo@{turbo_version}"));

// rather than passing an argument that local turbo might not understand, set
// an environment variable that can be optionally used
Expand Down
3 changes: 1 addition & 2 deletions crates/turborepo-lib/src/task_graph/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,9 +980,8 @@ impl ExecContext {
let mut stdout_writer = self
.task_cache
.output_writer(prefixed_ui.task_writer())
.map_err(|e| {
.inspect_err(|_| {
telemetry.track_error(TrackedErrors::FailedToCaptureOutputs);
e
})?;

let exit_status = match process.wait_with_piped_outputs(&mut stdout_writer).await {
Expand Down
3 changes: 1 addition & 2 deletions crates/turborepo-lib/src/task_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,11 @@ impl PackageInputsHashes {
)
.await
})
.map_err(|e| {
.inspect_err(|_| {
tracing::debug!(
"daemon file hashing timed out for {}",
package_path
);
e
})
.ok() // If we timed out, we don't need to
// error,
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-scm/src/ls_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn nom_parse_ls_tree(i: &[u8]) -> nom::IResult<&[u8], LsTreeEntry<'_>> {
let (i, _) = nom::bytes::complete::take(1usize)(i)?;
let (i, filename) = nom::bytes::complete::is_not("\0")(i)?;
// We explicitly support a missing terminator
let (i, _) = nom::combinator::opt(nom::bytes::complete::tag(&[b'\0']))(i)?;
let (i, _) = nom::combinator::opt(nom::bytes::complete::tag(b"\0"))(i)?;
Ok((i, LsTreeEntry { filename, hash }))
}

Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-scm/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn nom_parse_status(i: &[u8]) -> nom::IResult<&[u8], StatusEntry<'_>> {
let (i, _) = nom::character::complete::space1(i)?;
let (i, filename) = nom::bytes::complete::is_not("\0")(i)?;
// We explicitly support a missing terminator
let (i, _) = nom::combinator::opt(nom::bytes::complete::tag(&[b'\0']))(i)?;
let (i, _) = nom::combinator::opt(nom::bytes::complete::tag(b"\0"))(i)?;
Ok((
i,
StatusEntry {
Expand Down
4 changes: 2 additions & 2 deletions crates/turborepo-vt100/src/screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ impl Screen {

// CSI h
#[allow(clippy::unused_self)]
pub(crate) fn sm(&mut self, params: &vte::Params) {
pub(crate) fn sm(&self, params: &vte::Params) {
// nothing, i think?
if log::log_enabled!(log::Level::Debug) {
log::debug!(
Expand Down Expand Up @@ -1353,7 +1353,7 @@ impl Screen {

// CSI l
#[allow(clippy::unused_self)]
pub(crate) fn rm(&mut self, params: &vte::Params) {
pub(crate) fn rm(&self, params: &vte::Params) {
// nothing, i think?
if log::log_enabled!(log::Level::Debug) {
log::debug!(
Expand Down

0 comments on commit 67f223c

Please sign in to comment.