Home
last modified time | relevance | path

Searched refs:unwrap (Results 1 – 24 of 24) sorted by relevance

/development/tools/external_crates/license_checker/src/
Dlicense_terms.rs56 spdx::Expression::parse("Apache-2.0").unwrap(), in try_from()
57 &vec![spdx::Licensee::parse("Apache-2.0").unwrap()] in try_from()
59 .unwrap(), in try_from()
61 required: BTreeSet::from([Licensee::parse("Apache-2.0").unwrap().into_req()]), in try_from()
68 spdx::Expression::parse("Apache-2.0 OR MIT").unwrap(), in try_from()
69 &vec![spdx::Licensee::parse("Apache-2.0").unwrap()] in try_from()
71 .unwrap(), in try_from()
73 required: BTreeSet::from([Licensee::parse("Apache-2.0").unwrap().into_req()]), in try_from()
74 not_required: BTreeSet::from([Licensee::parse("MIT").unwrap().into_req()]) in try_from()
81 spdx::Expression::parse("Apache-2.0").unwrap(), in try_from()
[all …]
Dlicense_data_tests.rs29 Some(&Licensee::parse("Unlicense").unwrap()), in file_name_tests()
34 Some(&Licensee::parse("MIT").unwrap()), in file_name_tests()
39 Some(&Licensee::parse("Apache-2.0").unwrap()), in file_name_tests()
44 Some(&Licensee::parse("Apache-2.0").unwrap()), in file_name_tests()
49 Some(&Licensee::parse("Apache-2.0").unwrap()), in file_name_tests()
54 Some(&Licensee::parse("0BSD").unwrap()), in file_name_tests()
63 Some(&Licensee::parse("MIT").unwrap()), in file_name_tests()
68 Some(&Licensee::parse("Apache-2.0").unwrap()), in file_name_tests()
88 BTreeSet::from([Licensee::parse("MIT").unwrap()]) in basic()
100 Some(Licensee::parse("BSD-3-Clause").unwrap()) in fuzzy()
[all …]
Dparsed_license_data.rs197 .unwrap(); in is_substring_of()
205 .unwrap(); in is_substring_of()
261 .unwrap(); in get_corrected_license_expr()
263 special_cases.get_corrected_license("bar", Some("Apache-2.0")).unwrap(), in get_corrected_license_expr()
264 spdx::Expression::parse("Apache-2.0").unwrap(), in get_corrected_license_expr()
268 special_cases.get_corrected_license("foo", None).unwrap(), in get_corrected_license_expr()
269 spdx::Expression::parse("MIT").unwrap(), in get_corrected_license_expr()
284 special_cases.get_corrected_license("bar", Some("Apache-2.0/MIT")).unwrap(), in get_corrected_license_expr()
285 spdx::Expression::parse("Apache-2.0 OR MIT").unwrap(), in get_corrected_license_expr()
Dlicenses.rs154 let mut ra = a.processed_text().unwrap().len() as f32 / contents.len() as f32; in classify_file_contents_fuzzy()
155 let mut rb = b.processed_text().unwrap().len() as f32 / contents.len() as f32; in classify_file_contents_fuzzy()
162 rb.partial_cmp(&ra).unwrap() in classify_file_contents_fuzzy()
178 Licenses::new(LICENSES, LICENSE_PREFERENCE, CRATE_LICENSE_SPECIAL_CASES).unwrap()
295 .unwrap(); in evaluate_crate_license()
297 licenses.evaluate_crate_license("foo", Some("Apache-2.0 OR MIT")).unwrap(), in evaluate_crate_license()
299 required: BTreeSet::from([Licensee::parse("Apache-2.0").unwrap().into_req()]), in evaluate_crate_license()
300 not_required: BTreeSet::from([Licensee::parse("MIT").unwrap().into_req()]) in evaluate_crate_license()
Dlib.rs171 let req = classifier.by_content().first().unwrap().clone().into_req(); in from()
229 Licensee::parse("Apache-2.0").unwrap().into_req() in apache()
232 Licensee::parse("MIT").unwrap().into_req() in mit()
240 LICENSE_DATA.evaluate_crate_license("foo", Some("Apache-2.0")).unwrap() in apache()
243 LICENSE_DATA.evaluate_crate_license("foo", Some("Apache-2.0 OR MIT")).unwrap() in apache_or_mit()
246 LICENSE_DATA.evaluate_crate_license("foo", Some("Apache-2.0 OR BSD-3-Clause")).unwrap() in apache_or_bsd()
Dlicense_file_finder.rs45 LazyLock::new(|| LICENSE_GLOBS.iter().map(|p| glob::Pattern::new(p).unwrap()).collect());
/development/tools/cargo_embargo/src/cargo/
Dcargo_out.rs40 env::current_dir().unwrap().canonicalize().unwrap(), in parse_cargo_out()
120 "--crate-name" => crate_name = arg_iter.next().unwrap().to_string(), in raw_name_from_rustc_invocation()
193 LazyLock::new(|| Regex::new(r"^ +Running `(?:/[^\s]*/)?rustc (.*)`$").unwrap()); in parse()
201 LazyLock::new(|| Regex::new(r"^ +Running `.*CARGO_.*=.*$").unwrap()); in parse()
219 Regex::new(r"^ *Running `.*CARGO_.*=.* (?:/[^\s]*/)?rustc (.*)`$").unwrap() in parse()
230 Regex::new(r#"^\[([^ ]*)[^\]]*\] running:? "(?:/[^\s]*/)?(cc|ar)" (.*)$"#).unwrap() in parse()
242 LazyLock::new(|| Regex::new(r"^ *--> ([^:]*):[0-9]+").unwrap()); in parse()
258 LazyLock::new(|| Regex::new(r"^### Running: .*$").unwrap()); in parse()
267 Regex::new(r"^\s*Running (?:unittests )?(.*) \(.*/(.*)\)$").unwrap() in parse()
270 LazyLock::new(|| Regex::new(r"^(\d+) tests?, (\d+) benchmarks$").unwrap()); in parse()
[all …]
Dmetadata.rs550 get_externs(&package, &packages, &[], &[], &[], false).unwrap(), in get_externs_cfg()
614 get_externs(&package, &packages, &[], &["foo".to_string()], &[], false).unwrap(), in get_externs_extra_cfg()
675 get_externs(&package, &packages, &["dep:bar".to_string()], &[], &[], false).unwrap(), in get_externs_rename()
692 get_externs(&package, &packages, &["dep:baz".to_string()], &[], &[], false).unwrap(), in get_externs_rename()
719 let package_dir = c.package_dir.to_str().unwrap(); in parse_metadata()
735 .unwrap(), in parse_metadata()
737 .unwrap(); in parse_metadata()
740 File::open(testdata_directory_path.join("crates.json")).unwrap(), in parse_metadata()
742 .unwrap() in parse_metadata()
754 .unwrap(), in parse_metadata()
[all …]
/development/tools/external_crates/crate_tool/src/
Dpseudo_crate.rs95 .unwrap(); in deps()
97 for line in from_utf8(&output.stdout).unwrap().lines().skip(1) { in deps()
105 .unwrap(); in deps()
106 deps.insert(words[0].to_string(), Version::parse(version).unwrap()); in deps()
126 .unwrap() in crates()
128 .unwrap(); in crates()
134 .unwrap(); in crates()
136 crates.add_from(vendor_dir).unwrap(); in crates()
Dlicense.rs89 .map(|l| (Licensee::parse(l.0).unwrap().into_req(), l.1))
111 .map(|l| (Licensee::parse(l.0).unwrap().into_req(), l.1))
Dmanaged_crate.rs113 self.android_crate_path().join("patches").unwrap() in patch_dir()
119 .unwrap() in temporary_build_directory()
121 .unwrap() in temporary_build_directory()
426 let license_file = license_files.first().unwrap(); in update_license_files()
484 GoogleMetadata::try_from(self.temporary_build_directory().join("METADATA").unwrap())?; in update_metadata()
Dmanaged_repo.rs88 PseudoCrate::new(self.path.join("pseudo_crate").unwrap()) in pseudo_crate()
94 self.path.join("crates").unwrap() in managed_dir()
97 self.managed_dir().join(crate_name).unwrap() in managed_dir_for()
111 Ok(self.path.with_same_root("external/rust/crates").unwrap().join(crate_name)?) in legacy_dir_for()
557 let base_version = base_version.unwrap(); in suggest_updates()
560 let patch_dir = krate.path().join("patches").unwrap(); in suggest_updates()
Dcrates_io.rs88 let expr = expr.unwrap(); in is_android()
/development/tools/cargo_embargo/src/
Dconfig.rs171 let Value::Array(mut variants) = config.remove("variants").unwrap() else { in to_json_string()
179 for (key, value) in variants[0].as_object().unwrap() { in to_json_string()
181 for (package_name, package_config) in value.as_object().unwrap() { in to_json_string()
182 for (package_key, package_value) in package_config.as_object().unwrap() { in to_json_string()
186 variant.as_object().unwrap().get("package") in to_json_string()
201 .unwrap() in to_json_string()
210 .all(|variant| variant.as_object().unwrap().get(key) == Some(value)) in to_json_string()
220 variant.as_object_mut().unwrap().remove(key); in to_json_string()
225 for package_key in package_config.as_object().unwrap().keys() { in to_json_string()
241 .retain(|_, package_config| !package_config.as_object().unwrap().is_empty()); in to_json_string()
[all …]
Dmain.rs269 Ok(canonical_rustfmt.parent().unwrap().to_owned()) in find_android_rust_toolchain()
274 let path = env::var_os("PATH").unwrap(); in add_to_path()
412 let package_name = &crates.iter().flatten().next().unwrap().package_name; in write_all_build_files()
626 let dest = out_dir.join(f.file_name().unwrap()); in write_build_files()
650 let main_module_name_overrides = &cfg.variants.first().unwrap().module_name_overrides; in write_build_files()
836 .map(|f| f.file_name().unwrap().to_str().unwrap().to_string()) in generate_android_bp()
877 modules.sort_by_key(|m| m.props.get_string("name").unwrap().to_string()); in generate_android_bp()
894 out_files.iter().map(|f| f.file_name().unwrap().to_str().unwrap().to_string()).collect() in generate_rules_mk()
1405 .unwrap(); in generate_bp()
1410 .unwrap(); in generate_bp()
[all …]
/development/tools/external_crates/test_mapping/src/
Dlib.rs83 let bpfile = path.join("Android.bp").unwrap(); in read()
88 let test_mapping_path = path.join("TEST_MAPPING").unwrap(); in read()
139 if self.path.with_same_root(new_path.clone()).unwrap().abs().exists() { in fix_import_paths()
157 let self_path = self.path.rel().to_str().unwrap(); in update_imports()
166 self.path.join("TEST_MAPPING").unwrap() in test_mapping()
Drdeps.rs46 .unwrap() in for_repo()
48 .or_insert_with(|| ReverseDeps::grep_and_parse(repo_root).unwrap()) in for_repo()
/development/samples/Vault/src/com/example/android/vault/
DSecretKeyWrapper.java110 public SecretKey unwrap(byte[] blob) throws GeneralSecurityException { in unwrap() method in SecretKeyWrapper
112 return (SecretKey) mCipher.unwrap(blob, "AES", Cipher.SECRET_KEY); in unwrap()
DVaultProvider.java187 final SecretKey key = wrapper.unwrap(wrapped); in loadOrGenerateKeys()
/development/tools/external_crates/crates_io_util/src/
Dandroid_target.rs39 let expr = expr.unwrap(); in is_android()
Dfeature_resolver.rs55 let f = frontier.pop_first().unwrap(); in resolve()
60 for child in self.version.features().get(f).unwrap() { in resolve()
/development/tools/external_crates/google_metadata/src/
Dlib.rs106 date.set_day(now.day().try_into().unwrap()); in set_date_to_today()
107 date.set_month(now.month().try_into().unwrap()); in set_date_to_today()
/development/tools/external_crates/rooted_path/src/
Dlib.rs58 self.path.strip_prefix(&self.root).unwrap() in rel()
/development/samples/browseable/CommitContentSampleApp/src/com.example.android.commitcontent.app/
DMainActivity.java177 (Parcelable) mCurrentInputContentInfo.unwrap()); in onSaveInstanceState()