MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / join_checking_for_separators

Function join_checking_for_separators

crates/cuda_builder/src/lib.rs:360–371  ·  view source on GitHub ↗

Joins strings together while ensuring none of the strings contain the separator.

(strings: Vec<impl Borrow<str>>, sep: &str)

Source from the content-addressed store, hash-verified

358
359/// Joins strings together while ensuring none of the strings contain the separator.
360fn join_checking_for_separators(strings: Vec<impl Borrow<str>>, sep: &str) -> String {
361 for s in &strings {
362 let s = s.borrow();
363 assert!(
364 !s.contains(sep),
365 "{:?} may not contain separator {:?}",
366 s,
367 sep
368 );
369 }
370 strings.join(sep)
371}
372
373fn invoke_rustc(builder: &CudaBuilder) -> Result<PathBuf, CudaBuilderError> {
374 // see https://github.com/EmbarkStudios/rust-gpu/blob/main/crates/spirv-builder/src/lib.rs#L385-L392

Callers 1

invoke_rustcFunction · 0.85

Calls 1

borrowMethod · 0.80

Tested by

no test coverage detected