Home
last modified time | relevance | path

Searched refs:new (Results 1 – 25 of 64) sorted by relevance

123

/development/tools/external_crates/crate_health/src/
Drepo_path.rs31 pub fn new<P: Into<PathBuf>, Q: Into<PathBuf>>(root: P, path: Q) -> RepoPath { in new() method
48 RepoPath::new(self.root.clone(), self.path.join(path)) in join()
51 RepoPath::new(self.root.clone(), path) in with_same_root()
61 let p = RepoPath::new(&"/foo", &"bar"); in test_basic()
62 assert_eq!(p.root(), Path::new("/foo")); in test_basic()
63 assert_eq!(p.rel(), Path::new("bar")); in test_basic()
65 assert_eq!(p.join(&"baz"), RepoPath::new("/foo", "bar/baz")); in test_basic()
66 assert_eq!(p.with_same_root(&"baz"), RepoPath::new("/foo", "baz")); in test_basic()
Dname_and_version.rs48 pub fn new(name: String, version: Version) -> Self { in new() method
59 Ok(NameAndVersion::new(name.to_string(), Version::parse(version)?)) in try_from_str()
72 NameAndVersionRef::new(self.name(), self.version()) in key()
77 pub fn new(name: &'a str, version: &'a Version) -> Self { in new() method
149 let nvp = NameAndVersionRef::new("foo", &version); in test_name_version_ref()
152 assert!(nvp.is_upgradable_to(&NameAndVersionRef::new("foo", &compat1)), "Patch update"); in test_name_version_ref()
154 nvp.is_upgradable_to(&NameAndVersionRef::new("foo", &compat2)), in test_name_version_ref()
158 !nvp.is_upgradable_to(&NameAndVersionRef::new("foo", &incompat)), in test_name_version_ref()
161 assert!(!nvp.is_upgradable_to(&NameAndVersionRef::new("foo", &older)), "Downgrade"); in test_name_version_ref()
162 assert!(!nvp.is_upgradable_to(&NameAndVersionRef::new("bar", &compat1)), "Different name"); in test_name_version_ref()
[all …]
Dpseudo_crate.rs45 pub fn new(path: RepoPath) -> PseudoCrate { in new() method
57 let mut deps = Vec::new(); in init()
76 let mut tt = TinyTemplate::new(); in init()
93 let status = Command::new("cargo") in add()
107 Command::new("cargo").args(["vendor"]).current_dir(self.path.abs()).output()?; in vendor()
Dcrate_collection.rs40 pub fn new<P: Into<PathBuf>>(repo_root: P) -> CrateCollection { in new() method
41 CrateCollection { crates: BTreeMap::new(), repo_root: repo_root.into() } in new()
44 for entry_or_err in WalkDir::new(self.repo_root.join(path)) { in add_from()
49 NameAndVersion::new(krate.name().to_string(), krate.version().clone()), in add_from()
Dandroid_bp.rs32 let pool = ThreadPool::new(std::cmp::max(num_cpus::get(), 32)); in generate_android_bps()
47 let mut results = BTreeMap::new(); in generate_android_bps()
49 results.insert_or_error(NameAndVersion::new(crate_name, crate_version), result?)?; in generate_android_bps()
80 Command::new(staging_path.with_same_root(&"out/host/linux-x86/bin/cargo_embargo").abs()); in run_cargo_embargo()
102 let status = Command::new("/usr/bin/bash") in build_cargo_embargo()
Dname_and_version_map.rs86 let mut seen = ::std::collections::HashSet::new(); in num_crates()
98 Box::new( in get_versions()
111 Box::new( in get_versions_mut()
128 let mut kept_keys: HashSet<NameAndVersion> = HashSet::new(); in filter_versions()
131 f(&mut group).into_iter().map(move |v| NameAndVersion::new(key.to_string(), v)), in filter_versions()
134 Box::new(self.iter().filter(move |(nv, _krate)| kept_keys.contains(*nv))) in filter_versions()
141 let mut vset = HashSet::new(); in crates_with_single_version()
152 let mut vset = HashSet::new(); in crates_with_multiple_versions()
163 let mut vset = HashSet::new(); in most_recent_version()
174 let mut test_map = BTreeMap::new(); in try_name_version_map_from_iter()
[all …]
Dcrate_type.rs54 NameAndVersionRef::new(self.name(), self.version()) in key()
61 pub fn new<P: Into<PathBuf>, Q: Into<PathBuf>>( in new() method
69 path: RepoPath::new(root.clone(), relpath), in new()
70 patch_output: Vec::new(), in new()
86 cargo::core::EitherManifest::Real(r) => Ok(Crate::new(r, root, relpath)), in from()
104 Path::new("out/rust-crate-temporary-build").join(self.staging_dir_name()), in staging_path()
236 let output = Command::new("patch") in apply_patches()
298 let cargo_toml: PathBuf = [temp_crate_dir, &Path::new("Cargo.toml")].iter().collect(); in write_test_manifest()
303 let lib_rs: PathBuf = [temp_crate_dir, &Path::new("src/lib.rs")].iter().collect(); in write_test_manifest()
339 Ok(Command::new("diff") in diff_android_bp()
Dmain.rs147 let mut cc = CrateCollection::new(&args.repo_root); in main()
194 RepoPath::new( in main()
198 RepoPath::new(args.repo_root.clone(), &"out/rust-crate-migration-report"), in main()
234 let diff_status = Command::new("diff") in main()
250 Command::new("diff") in main()
Dmigration.rs99 let mut source = CrateCollection::new(source_dir.root()); in migrate()
103 let pseudo_crate = PseudoCrate::new(pseudo_crate_dir); in migrate()
115 let mut dest = CrateCollection::new(source.repo_root()); in migrate()
118 let mut version_match = VersionMatch::new(source, dest)?; in migrate()
Dreports.rs55 pub fn new() -> Result<ReportEngine<'template>> { in new() method
56 let mut tt = TinyTemplate::new(); in new()
78 let mut table = Table::new(&[&"Crate", &"Version", &"Path"]); in table()
91 let mut table = Table::new(&[ in health_table()
139 let mut table = Table::new(&[&"Crate", &"Old Version", &"New Version", &"Path"]); in migratable_table()
163 let mut table = Table::new(&[ in migration_ineligible_table()
192 let mut table = Table::new(&[ in migration_eligible_table()
322 pub fn new(header: &[&dyn Display]) -> Table { in new() method
325 rows: Vec::new(), in new()
/development/tools/cargo_embargo/src/cargo/
Dcargo_out.rs59 let mut crates = Vec::new(); in parse_cargo_out_str()
133 Lazy::new(|| Regex::new(r"^ +Running `rustc (.*)`$").unwrap()); in parse()
141 Lazy::new(|| Regex::new(r"^ +Running `.*CARGO_.*=.*$").unwrap()); in parse()
159 Lazy::new(|| Regex::new(r"^ *Running `.*CARGO_.*=.* rustc (.*)`$").unwrap()); in parse()
168 static CC_AR_VV_REGEX: Lazy<Regex> = Lazy::new(|| { in parse()
169 Regex::new(r#"^\[([^ ]*)[^\]]*\] running:? "(cc|ar)" (.*)$"#).unwrap() in parse()
181 Lazy::new(|| Regex::new(r"^ *--> ([^:]*):[0-9]+").unwrap()); in parse()
197 Lazy::new(|| Regex::new(r"^### Running: .*$").unwrap()); in parse()
206 Lazy::new(|| Regex::new(r"^\s*Running (?:unittests )?(.*) \(.*/(.*)\)$").unwrap()); in parse()
208 Lazy::new(|| Regex::new(r"^(\d+) tests?, (\d+) benchmarks$").unwrap()); in parse()
[all …]
/development/samples/browseable/DocumentCentricApps/
D_index.jd8 This sample shows the basic usage of the new \"Document Centric Apps\" API.
9 It let\'s you create new documents in the system overview menu and persists its
10 state through reboots. If \"Task per document\" is checked a new task will be
11 created for every new document in the overview menu.
/development/tools/external_crates/crate_health/src/bin/
Dmigration_report.rs43 RepoPath::new(args.repo_root.clone(), &"external/rust/crates"), in main()
44 RepoPath::new(args.repo_root.clone(), &"out/rust-crate-migration-report"), in main()
47 let re = ReportEngine::new()?; in main()
Dhealth_report.rs42 let mut cc = CrateCollection::new(args.repo_root); in main()
50 let re = ReportEngine::new()?; in main()
/development/samples/AconfigDemo/
Daconfig_demo_flags.aconfig99 description: "A regular server-side flag moving on new path to gantry"
107 description: "A regular server-side flag moving on new path to gantry"
115 description: "Another regular server-side flag moving on new path to gantry"
123 description: "Another regular server-side flag moving on new path to gantry"
131 description: "Another regular server-side flag moving on new path to gantry"
142 description: "Another regular server-side flag moving on new path to gantry"
/development/tools/cargo_embargo/src/
Dmain.rs66 pub static RENAME_MAP: Lazy<BTreeMap<&str, &str>> = Lazy::new(|| {
90 pub static RULESMK_RENAME_MAP: Lazy<BTreeMap<&str, &str>> = Lazy::new(|| {
289 if !Path::new("Cargo.toml").try_exists().context("when checking Cargo.toml")? { in make_crates()
344 let mut package_out_files: BTreeMap<String, Vec<Vec<PathBuf>>> = BTreeMap::new(); in run_embargo()
385 let mut module_by_package: BTreeMap<PathBuf, Vec<Vec<Crate>>> = BTreeMap::new(); in group_by_package()
444 let mut output = String::new(); in run_cargo()
472 run_cargo(Command::new("cargo").arg("clean").arg("--target-dir").arg(&target_dir)) in generate_cargo_out()
501 Command::new("cargo") in generate_cargo_out()
510 let mut cargo_out = String::new(); in generate_cargo_out()
527 Command::new("cargo") in generate_cargo_out()
[all …]
Dbp.rs57 pub fn new(module_type: String) -> BpModule { in new() method
58 BpModule { module_type, props: BpProperties::new() } in new()
72 pub fn new() -> Self { in new() method
73 BpProperties { map: BTreeMap::new(), raw_block: None } in new()
95 self.map.entry(k.to_string()).or_insert_with(|| BpValue::Object(BpProperties::new())); in object()
/development/tools/ota_analysis/src/views/
DDemo.vue54 this.zipFile = new File([download.data], 'ota_demo.zip')
55 this.payload = new Payload(this.zipFile)
65 this.payload = new Payload(this.zipFile)
/development/tools/labpretest/
DREADME28 Adding support for new devices or from scratch:
35 Here are the steps to add a new device:
37 1) Create a new sub directory using the result of "fastboot getvar product".
38 2) Copy a build image to the new sub directory in our format.
40 3) Copy a boot image to the new sub directory in our format.
42 4) Copy a radio image to the new sub directory in our format.
/development/host/windows/usb/
Dreadme.txt27 file to add descriptions for new devices and interfaces. Note that when .inf
34 template to create new .inf file for new devices. Note that you also need
35 to build and sign new .cat files for that custom .inf file of yours.
/development/tools/ota_analysis/src/components/
DPartialCheckbox.vue33 default: new Array(),
37 default: new Map(),
/development/tools/checkcolor/
Dbuild.gradle16 buildDir = new File(System.env.OUT_DIR + '/gradle/checkcolor').getCanonicalFile()
17 project.ext.distDir = new File(System.env.DIST_DIR).getCanonicalFile()
/development/samples/
DREADME1 Adding a new folder in development/samples is not enough to have it
/development/samples/browseable/TextSwitcher/
D_index.jd9 \n\nClick the button below to set new text in the TextSwitcher and observe the
/development/samples/browseable/BasicImmersiveMode/
D_index.jd8 \"Immersive Mode\" is a new UI mode which improves \"hide full screen\" and

123