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

Function join_checking_for_separators

crates/spirv-builder/src/lib.rs:532–538  ·  view source on GitHub ↗

Joins strings together while ensuring none of the strings contain the separator. NOTE(eddyb) this intentionally consumes the `Vec` to limit accidental misuse.

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

Source from the content-addressed store, hash-verified

530/// Joins strings together while ensuring none of the strings contain the separator.
531// NOTE(eddyb) this intentionally consumes the `Vec` to limit accidental misuse.
532fn join_checking_for_separators(strings: Vec<impl Borrow<str>>, sep: &str) -> String {
533 for s in &strings {
534 let s = s.borrow();
535 assert!(!s.contains(sep), "{s:?} may not contain separator {sep:?}");
536 }
537 strings.join(sep)
538}
539
540// Returns path to the metadata json.
541fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {

Callers 1

invoke_rustcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected