@@ -31,7 +31,7 @@ fn stdio(command: Command) -> Command {
3131fn total_width ( ) {
3232 let workspace = SampleWorkspace :: default ( ) ;
3333 let actual = Command :: new ( PDU )
34- . with_current_dir ( workspace. as_path ( ) )
34+ . with_current_dir ( & workspace)
3535 . with_arg ( "--total-width=100" )
3636 . pipe ( stdio)
3737 . output ( )
@@ -67,7 +67,7 @@ fn total_width() {
6767fn column_width ( ) {
6868 let workspace = SampleWorkspace :: default ( ) ;
6969 let actual = Command :: new ( PDU )
70- . with_current_dir ( workspace. as_path ( ) )
70+ . with_current_dir ( & workspace)
7171 . with_arg ( "--column-width" )
7272 . with_arg ( "10" )
7373 . with_arg ( "90" )
@@ -105,7 +105,7 @@ fn column_width() {
105105fn min_ratio_0 ( ) {
106106 let workspace = SampleWorkspace :: default ( ) ;
107107 let actual = Command :: new ( PDU )
108- . with_current_dir ( workspace. as_path ( ) )
108+ . with_current_dir ( & workspace)
109109 . with_arg ( "--quantity=apparent-size" )
110110 . with_arg ( "--total-width=100" )
111111 . with_arg ( "--min-ratio=0" )
@@ -142,7 +142,7 @@ fn min_ratio_0() {
142142fn min_ratio ( ) {
143143 let workspace = SampleWorkspace :: default ( ) ;
144144 let actual = Command :: new ( PDU )
145- . with_current_dir ( workspace. as_path ( ) )
145+ . with_current_dir ( & workspace)
146146 . with_arg ( "--quantity=apparent-size" )
147147 . with_arg ( "--total-width=100" )
148148 . with_arg ( "--min-ratio=0.1" )
@@ -180,7 +180,7 @@ fn min_ratio() {
180180fn max_depth_2 ( ) {
181181 let workspace = SampleWorkspace :: default ( ) ;
182182 let actual = Command :: new ( PDU )
183- . with_current_dir ( workspace. as_path ( ) )
183+ . with_current_dir ( & workspace)
184184 . with_arg ( "--quantity=apparent-size" )
185185 . with_arg ( "--total-width=100" )
186186 . with_arg ( "--max-depth=2" )
@@ -218,7 +218,7 @@ fn max_depth_2() {
218218fn max_depth_1 ( ) {
219219 let workspace = SampleWorkspace :: default ( ) ;
220220 let actual = Command :: new ( PDU )
221- . with_current_dir ( workspace. as_path ( ) )
221+ . with_current_dir ( & workspace)
222222 . with_arg ( "--quantity=apparent-size" )
223223 . with_arg ( "--total-width=100" )
224224 . with_arg ( "--max-depth=1" )
@@ -256,7 +256,7 @@ fn max_depth_1() {
256256fn top_down ( ) {
257257 let workspace = SampleWorkspace :: default ( ) ;
258258 let actual = Command :: new ( PDU )
259- . with_current_dir ( workspace. as_path ( ) )
259+ . with_current_dir ( & workspace)
260260 . with_arg ( "--total-width=100" )
261261 . with_arg ( "--top-down" )
262262 . pipe ( stdio)
@@ -293,7 +293,7 @@ fn top_down() {
293293fn align_right ( ) {
294294 let workspace = SampleWorkspace :: default ( ) ;
295295 let actual = Command :: new ( PDU )
296- . with_current_dir ( workspace. as_path ( ) )
296+ . with_current_dir ( & workspace)
297297 . with_arg ( "--total-width=100" )
298298 . with_arg ( "--align-right" )
299299 . pipe ( stdio)
@@ -330,7 +330,7 @@ fn align_right() {
330330fn quantity_apparent_size ( ) {
331331 let workspace = SampleWorkspace :: default ( ) ;
332332 let actual = Command :: new ( PDU )
333- . with_current_dir ( workspace. as_path ( ) )
333+ . with_current_dir ( & workspace)
334334 . with_arg ( "--total-width=100" )
335335 . with_arg ( "--quantity=apparent-size" )
336336 . pipe ( stdio)
@@ -368,7 +368,7 @@ fn quantity_apparent_size() {
368368fn quantity_block_size ( ) {
369369 let workspace = SampleWorkspace :: default ( ) ;
370370 let actual = Command :: new ( PDU )
371- . with_current_dir ( workspace. as_path ( ) )
371+ . with_current_dir ( & workspace)
372372 . with_arg ( "--total-width=100" )
373373 . with_arg ( "--quantity=block-size" )
374374 . pipe ( stdio)
@@ -406,7 +406,7 @@ fn quantity_block_size() {
406406fn quantity_block_count ( ) {
407407 let workspace = SampleWorkspace :: default ( ) ;
408408 let actual = Command :: new ( PDU )
409- . with_current_dir ( workspace. as_path ( ) )
409+ . with_current_dir ( & workspace)
410410 . with_arg ( "--total-width=100" )
411411 . with_arg ( "--quantity=block-count" )
412412 . pipe ( stdio)
@@ -444,7 +444,7 @@ fn quantity_block_count() {
444444fn bytes_format_plain ( ) {
445445 let workspace = SampleWorkspace :: default ( ) ;
446446 let actual = Command :: new ( PDU )
447- . with_current_dir ( workspace. as_path ( ) )
447+ . with_current_dir ( & workspace)
448448 . with_arg ( "--total-width=100" )
449449 . with_arg ( "--quantity=block-size" )
450450 . with_arg ( "--bytes-format=plain" )
@@ -483,7 +483,7 @@ fn bytes_format_plain() {
483483fn bytes_format_metric ( ) {
484484 let workspace = SampleWorkspace :: default ( ) ;
485485 let actual = Command :: new ( PDU )
486- . with_current_dir ( workspace. as_path ( ) )
486+ . with_current_dir ( & workspace)
487487 . with_arg ( "--total-width=100" )
488488 . with_arg ( "--quantity=block-size" )
489489 . with_arg ( "--bytes-format=metric" )
@@ -522,7 +522,7 @@ fn bytes_format_metric() {
522522fn bytes_format_binary ( ) {
523523 let workspace = SampleWorkspace :: default ( ) ;
524524 let actual = Command :: new ( PDU )
525- . with_current_dir ( workspace. as_path ( ) )
525+ . with_current_dir ( & workspace)
526526 . with_arg ( "--total-width=100" )
527527 . with_arg ( "--quantity=block-size" )
528528 . with_arg ( "--bytes-format=binary" )
@@ -560,9 +560,9 @@ fn bytes_format_binary() {
560560fn path_to_workspace ( ) {
561561 let workspace = SampleWorkspace :: default ( ) ;
562562 let actual = Command :: new ( PDU )
563- . with_current_dir ( workspace. as_path ( ) )
563+ . with_current_dir ( & workspace)
564564 . with_arg ( "--total-width=100" )
565- . with_arg ( workspace. as_path ( ) )
565+ . with_arg ( & workspace)
566566 . pipe ( stdio)
567567 . output ( )
568568 . expect ( "spawn command" )
@@ -596,7 +596,7 @@ fn path_to_workspace() {
596596fn multiple_names ( ) {
597597 let workspace = SampleWorkspace :: default ( ) ;
598598 let actual = Command :: new ( PDU )
599- . with_current_dir ( workspace. as_path ( ) )
599+ . with_current_dir ( & workspace)
600600 . with_arg ( "--quantity=apparent-size" )
601601 . with_arg ( "--total-width=100" )
602602 . with_arg ( "nested" )
0 commit comments