MCPcopy Create free account
hub / github.com/VSCodeConfigHelper/v4 / new

Method new

src-tauri/src/steps/compiler/mod.rs:45–58  ·  view source on GitHub ↗
(setup: &CompilerSetup, path: &str, version_text: &str)

Source from the content-addressed store, hash-verified

43
44impl Compiler {
45 pub fn new(setup: &CompilerSetup, path: &str, version_text: &str) -> Option<Compiler> {
46 let (version, package_string) = match setup.ty {
47 CompilerType::GCC => verparse::gcc(version_text).ok()?,
48 CompilerType::LLVM => verparse::clang(version_text).ok()?,
49 CompilerType::MSVC => return None,
50 };
51 let compiler = Compiler {
52 setup: setup.id,
53 path: path.to_string(),
54 version: version.to_string(),
55 package_string: package_string.to_string(),
56 };
57 Some(compiler)
58 }
59}
60
61#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Copy)]

Callers

nothing calls this directly

Calls 3

to_stringMethod · 0.80
gccFunction · 0.70
clangFunction · 0.70

Tested by

no test coverage detected