File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ pub(crate) fn run(
166166 // simpler: just test if the program termination handler was called.
167167 // SAFETY: an atomic load.
168168 #[ allow( static_mut_refs) ]
169- let is_terminated = unsafe { crate :: errors:: TERMINATED . load ( Ordering :: SeqCst ) } ;
169+ let is_terminated = crate :: errors:: TERMINATED . load ( Ordering :: SeqCst ) ;
170170 if !is_terminated {
171171 ChildContainer :: exit_static ( ) ;
172172 }
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ use super::custom::{Dockerfile, PreBuild};
44use super :: image:: PossibleImage ;
55use super :: Image ;
66use super :: PROVIDED_IMAGES ;
7- use super :: custom:: { Dockerfile , PreBuild } ;
8- use super :: image:: PossibleImage ;
97use super :: { ProvidedImage , engine:: * } ;
108use crate :: cargo:: CargoMetadata ;
119use crate :: config:: Config ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ pub fn install_panic_hook() -> Result<()> {
1919
2020/// # Safety
2121/// Safe as long as we have single-threaded execution.
22- unsafe fn termination_handler ( ) {
22+ fn termination_handler ( ) {
2323 // we can't warn the user here, since locks aren't signal-safe.
2424 // we can delete files, since fdopendir is thread-safe, and
2525 // `openat`, `unlinkat`, and `lstat` are signal-safe.
@@ -106,7 +106,7 @@ unsafe fn termination_handler() {
106106 // a global CString and `Vec<CString>`, respectively. this atomic guard
107107 // makes this safe regardless.
108108 #[ allow( static_mut_refs) ] // FIXME: Use correct types for CHILD_CONTAINER
109- docker:: CHILD_CONTAINER . terminate ( ) ;
109+ unsafe { docker:: CHILD_CONTAINER . terminate ( ) ; }
110110
111111 // all termination exit codes are 128 + signal code. the exit code is
112112 // 130 for Ctrl+C or SIGINT (signal code 2) for linux, macos, and windows.
You can’t perform that action at this time.
0 commit comments