@@ -427,8 +427,8 @@ fn depfile_parsing_sandbox(canonical_manifest_path: &Path) -> Result<Birdcage> {
427427
428428 // Allow any executable in common binary directories.
429429 //
430- // Reading binaries shouldn't be an attack vector, but significantly simplifies
431- // complex ecosystems (like Python's symlinks).
430+ // Reading binaries shouldn't be an attack vector, but significantly
431+ // simplifies complex ecosystems (like Python's symlinks).
432432 permissions:: add_exception ( & mut birdcage, Exception :: ExecuteAndRead ( "/usr/bin" . into ( ) ) ) ?;
433433 permissions:: add_exception ( & mut birdcage, Exception :: ExecuteAndRead ( "/bin" . into ( ) ) ) ?;
434434
@@ -577,43 +577,46 @@ mod tests {
577577 let tempdir = tempfile:: tempdir ( ) . unwrap ( ) ;
578578 let tempdir = tempdir. path ( ) . canonicalize ( ) . unwrap ( ) ;
579579
580- // Create a sample project directory named "sample" inside the "projects"
581- // directory. Also create a "Cargo.lock" file inside the "sample"
582- // directory.
580+ // Create a sample project directory named "sample" inside the
581+ // "projects" directory. Also create a "Cargo.lock" file inside
582+ // the "sample" directory.
583583 let sample_dir = tempdir. join ( "sample" ) ;
584584 let lockfile_path = sample_dir. join ( "Cargo.lock" ) ;
585585 fs:: create_dir_all ( & sample_dir) . unwrap ( ) ;
586586 File :: create ( & lockfile_path) . unwrap ( ) ;
587587
588588 // Change the current directory to the "sample" project directory.
589589 let path = relative_path ( & sample_dir, & lockfile_path) . unwrap ( ) ;
590- // The path to the lockfile should now be just the filename since it's in the
591- // current directory.
590+ // The path to the lockfile should now be just the filename since it's
591+ // in the current directory.
592592 assert_eq ! ( path. as_os_str( ) , "Cargo.lock" ) ;
593593
594- // Create a subdirectory named "sub" within the "sample" project directory.
594+ // Create a subdirectory named "sub" within the "sample" project
595+ // directory.
595596 let sub_dir = sample_dir. join ( "sub" ) ;
596597 fs:: create_dir_all ( & sub_dir) . unwrap ( ) ;
597598
598599 // Change the current directory to the new "sub" directory.
599600 let rel_lockfile_path = sub_dir. join ( "../Cargo.lock" ) ;
600601
601- // Get the relative path from the sub directory to the lockfile in the sample
602- // directory.
602+ // Get the relative path from the sub directory to the lockfile in the
603+ // sample directory.
603604 let path = relative_path ( & sample_dir, & rel_lockfile_path) . unwrap ( ) ;
604- // The path to the lockfile should be the same as before since we are looking
605- // relative to the sample directory.
605+ // The path to the lockfile should be the same as before since we are
606+ // looking relative to the sample directory.
606607 assert_eq ! ( path. as_os_str( ) , "Cargo.lock" ) ;
607608
608- // Create another "Cargo.lock" file one level above the "sample" directory.
609+ // Create another "Cargo.lock" file one level above the "sample"
610+ // directory.
609611 let above_lockfile_path = tempdir. join ( "Cargo.lock" ) ;
610612 File :: create ( above_lockfile_path) . unwrap ( ) ;
611613 let rel_lockfile_path = sub_dir. join ( "../../Cargo.lock" ) ;
612614
613- // Although the current directory is still "sub", get the relative path to the
614- // lockfile above the "sample" directory.
615+ // Although the current directory is still "sub", get the relative path
616+ // to the lockfile above the "sample" directory.
615617 let path = relative_path ( & sample_dir, & rel_lockfile_path) . unwrap ( ) ;
616- // The path to the lockfile should be relative to the "sample" directory.
618+ // The path to the lockfile should be relative to the "sample"
619+ // directory.
617620 assert_eq ! ( path, Path :: new( "../Cargo.lock" ) ) ;
618621 }
619622}
0 commit comments