pub fn from_file<P: AsRef<Path>>(f: P) -> Wasm {
        let mut wasm_data = Vec::new();
        let mut wasm_file = File::open(&f).unwrap_or_else(|e| {
            panic!(
                "Could not open wasm file: {} - Error: {}",
                f.as_ref().display(),
                e
            )
        });
        wasm_file
            .read_to_end(&mut wasm_data)
            .unwrap_or_else(|e| panic!("{}", e.to_string()));

        // It's not very consistent with the other `from_xx` functions to
        // optimize wasms here. This is because canisters are not optimized
        // on CI; see OPS-178.
        Wasm::from_bytes(wasm_data).strip_debug_info()
    }
/// This read's WASM from a file path
/// This function is very partial and should only be used for testing
This read's WASM from a file path
This function is very partial and should only be used for testing
This read ' s WASM from a file path This function is very partial and should only be used for testing
pub fn from_file<P: AsRef<Path>>(f: P) -> Wasm {
        let mut wasm_data = Vec::new();
        let mut wasm_file = File::open(&f).unwrap_or_else(|e| {
            panic!(
                "Could not open wasm file: {} - Error: {}",
                f.as_ref().display(),
                e
            )
        });
        wasm_file
            .read_to_end(&mut wasm_data)
            .unwrap_or_else(|e| panic!("{}", e.to_string()));
        // It's not very consistent with the other `from_xx` functions to
        // optimize wasms here. This is because canisters are not optimized
        // on CI; see OPS-178.
        Wasm::from_bytes(wasm_data).strip_debug_info()
    }
pub fn from_file < P : AsRef < Path > > ( f : P ) -> Wasm { let mut wasm_data = Vec :: new ( ) ; let mut wasm_file = File :: open ( & f ) . unwrap_or_else ( | e | { panic ! ( " " f as_ref ( ) display ( ) e ) } ) ; wasm_file . read_to_end ( & mut wasm_data ) . unwrap_or_else ( | e | panic ! ( " " e to_string ( ) ) ) ; // It's not very consistent with the other `from_xx` functions to // optimize wasms here. This is because canisters are not optimized // on CI; see OPS-178. Wasm :: from_bytes ( wasm_data ) . strip_debug_info ( ) }
This read's WASM from a file path
This function is very partial and should only be used for testing
This read ' s WASM from a file path This function is very partial and should only be used for testing
f
P
f
P