Skip to content

Commit 4c650af

Browse files
committed
Fix test/clippy
1 parent 13c9c34 commit 4c650af

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub enum Error {
149149
#[error("failed to read file: {0}")]
150150
FileNotFound(AbsoluteSystemPathBuf),
151151
#[error("failed to write to file: {0}")]
152-
FileWriteError(AbsoluteSystemPathBuf),
152+
FileWrite(AbsoluteSystemPathBuf),
153153
}
154154

155155
impl BoundariesDiagnostic {
@@ -492,7 +492,7 @@ impl Run {
492492
// Deduplicate and sort by offset
493493
let file_patches = file_patches
494494
.into_iter()
495-
.map(|(span, patch)| (span.offset(), patch.into()))
495+
.map(|(span, patch)| (span.offset(), patch))
496496
.collect::<BTreeMap<usize, String>>();
497497

498498
let contents = file_path
@@ -516,23 +516,23 @@ impl Run {
516516
// If newline exists, we write all the contents before newline
517517
if let Some(newline_idx) = newline_idx {
518518
file.write_all(contents[last_idx..(last_idx + newline_idx)].as_bytes())
519-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
519+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
520520
file.write_all(b"\n")
521-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
521+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
522522
}
523523

524524
file.write_all(b"// @boundaries-ignore ")
525-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
525+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
526526
file.write_all(reason.as_bytes())
527-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
527+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
528528
file.write_all(b"\n")
529-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
529+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
530530

531531
last_idx = idx;
532532
}
533533

534534
file.write_all(contents[last_idx..].as_bytes())
535-
.map_err(|_| Error::FileWriteError(file_path.to_owned()))?;
535+
.map_err(|_| Error::FileWrite(file_path.to_owned()))?;
536536

537537
Ok(())
538538
}

turborepo-tests/integration/tests/command-boundaries.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Setup
44
Ignore all errors
55
$ ${TURBO} boundaries --ignore=all
66
Checking packages...
7-
patching apps/my-app/(index|types).ts (re)
8-
patching apps/my-app/(index|types).ts (re)
7+
patching apps(\\|/)my-app(\\|/)(index|types).ts (re)
8+
patching apps(\\|/)my-app(\\|/)(index|types).ts (re)
99
[1]
1010

1111
$ git diff

0 commit comments

Comments
 (0)