usecrate::sys;/// Charge gas for the operation identified by name.
pubfncharge(name:&str, compute:u64){unsafe{sys::gas::charge(name.as_ptr(), name.len()asu32, compute)}// can only happen if name isn't utf8, memory corruption, etc.
.expect("failed to charge gas")}