(string: T)
| 297 | )] |
| 298 | #[allow(clippy::should_implement_trait)] |
| 299 | pub fn from_str<T: AsRef<str>>(string: T) -> CudaResult<Module> { |
| 300 | let cstr = CString::new(string.as_ref()) |
| 301 | .expect("string given to Module::from_str contained nul bytes"); |
| 302 | #[allow(deprecated)] |
| 303 | Self::load_from_string(cstr.as_c_str()) |
| 304 | } |
| 305 | |
| 306 | /// Load a module from a CStr. |
| 307 | /// |