Home
last modified time | relevance | path

Searched refs:to_owned (Results 1 – 25 of 244) sorted by relevance

12345678910

/external/rust/crates/protobuf-codegen/src/
Dprotobuf_name.rs15 ProtobufIdent(s.to_owned()) in new()
65 let v: Vec<String> = i.into_iter().map(|c| c.get().to_owned()).collect(); in from_components()
103 Some(pos) => Some(ProtobufRelativePath::new(self.path[..pos].to_owned())), in parent()
152 ProtobufRelativePath::new(self.path[dot + 1..].to_owned()), in split_first_rem()
165 ProtobufRelativePath::from(s.to_owned()) in from()
202 ProtobufRelativePath::new("aaa".to_owned()).parent() in parent()
205 Some(ProtobufRelativePath::new("abc".to_owned())), in parent()
206 ProtobufRelativePath::new("abc.def".to_owned()).parent() in parent()
209 Some(ProtobufRelativePath::new("abc.def".to_owned())), in parent()
210 ProtobufRelativePath::new("abc.def.gh".to_owned()).parent() in parent()
[all …]
/external/crosvm/src/
Dmain.rs84 value: part.to_owned(), in parse_cpu_set()
91 value: part.to_owned(), in parse_cpu_set()
98 value: part.to_owned(), in parse_cpu_set()
107 value: part.to_owned(), in parse_cpu_set()
132 value: cpu_pair.to_owned(), in parse_cpu_affinity()
139 value: assignment[0].to_owned(), in parse_cpu_affinity()
145 value: cpu_pair.to_owned(), in parse_cpu_affinity()
566 value: value.to_owned(), in parse_plugin_mount_option()
576 value: components[0].to_owned(), in parse_plugin_mount_option()
582 value: components[0].to_owned(), in parse_plugin_mount_option()
[all …]
Dargument.rs251 "expected parameter name before `=`".to_owned(), in parse_arguments()
256 "expected parameter value after `=`".to_owned(), in parse_arguments()
263 name: param.to_owned(), in parse_arguments()
269 "expected argument short name after `-`".to_owned(), in parse_arguments()
277 name: name.to_owned(), in parse_arguments()
349 return Err(Error::ExpectedValue(arg.long.to_owned())); in set_arguments()
352 return Err(Error::UnexpectedValue(arg.long.to_owned())); in set_arguments()
359 None => Err(Error::UnknownArgument(name.to_owned())), in set_arguments()
444 value: value.unwrap().to_owned(), in mixed_args()
/external/minijail/rust/minijail/src/
Dlib.rs300 let user_cstring = CString::new(user).map_err(|_| Error::StrToCString(user.to_owned()))?; in change_user()
308 CString::new(group).map_err(|_| Error::StrToCString(group.to_owned()))?; in change_group()
357 return Err(Error::SeccompPath(path.as_ref().to_owned())); in parse_seccomp_program()
386 return Err(Error::SeccompPath(path.as_ref().to_owned())); in parse_seccomp_filters()
393 .ok_or_else(|| Error::PathToCString(path.as_ref().to_owned()))?; in parse_seccomp_filters()
395 CString::new(pathstring).map_err(|_| Error::PathToCString(path.as_ref().to_owned()))?; in parse_seccomp_filters()
486 CString::new(uid_map).map_err(|_| Error::StrToCString(uid_map.to_owned()))?; in uidmap()
494 CString::new(gid_map).map_err(|_| Error::StrToCString(gid_map.to_owned()))?; in gidmap()
507 CString::new(table_name).map_err(|_| Error::StrToCString(table_name.to_owned()))?; in use_alt_syscall()
512 name: table_name.to_owned(), in use_alt_syscall()
[all …]
/external/rust/crates/serde_cbor/tests/
Dser.rs53 let value = "foobar".to_owned(); in test_string()
66 object.insert("a".to_owned(), "A".to_owned()); in test_object()
67 object.insert("b".to_owned(), "B".to_owned()); in test_object()
68 object.insert("c".to_owned(), "C".to_owned()); in test_object()
69 object.insert("d".to_owned(), "D".to_owned()); in test_object()
70 object.insert("e".to_owned(), "E".to_owned()); in test_object()
110 .map(|v| BTreeMap::from_iter(v.into_iter().map(|s| (s.to_owned(), ())))); in test_object_object_keys()
Dde.rs58 assert_eq!(value.unwrap(), Value::Text("foobar".to_owned())); in test_string1()
67 assert_eq!(value.unwrap(), Value::Text("I met a traveller".to_owned())); in test_string2()
76 Value::Text("I met a traveller from an antique land who said".to_owned()) in test_string3()
149 object.insert(Value::Text("a".to_owned()), Value::Text("A".to_owned())); in test_object()
150 object.insert(Value::Text("b".to_owned()), Value::Text("B".to_owned())); in test_object()
151 object.insert(Value::Text("c".to_owned()), Value::Text("C".to_owned())); in test_object()
152 object.insert(Value::Text("d".to_owned()), Value::Text("D".to_owned())); in test_object()
153 object.insert(Value::Text("e".to_owned()), Value::Text("E".to_owned())); in test_object()
161 object.insert(Value::Text("a".to_owned()), Value::Integer(1)); in test_indefinite_object()
163 Value::Text("b".to_owned()), in test_indefinite_object()
[all …]
/external/adhd/sound_card_init/dsm/src/
Ddatastore.rs32 BufReader::new(File::open(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?); in from_file()
34 serde_yaml::from_reader(reader).map_err(|e| Error::SerdeError(path.to_owned(), e))?; in from_file()
43 File::create(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?, in save()
48 .map_err(|e| Error::SerdeError(path.to_owned(), e))? in save()
51 .map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in save()
54 .map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in save()
62 remove_file(&path).map_err(|e| Error::FileIOFailed(path.to_owned(), e))?; in delete()
/external/rust/crates/criterion/src/
Dfs.rs20 path: path.to_owned(), in load()
26 path: path.to_owned(), in load()
46 path: path.as_ref().to_owned(), in mkdirp()
54 from: from.to_owned(), in cp()
55 to: to.to_owned(), in cp()
66 path: path.as_ref().to_owned(), in save()
82 path: path.as_ref().to_owned(), in save_string()
Dreport.rs235 None => "None".to_owned(), in fmt()
559 let mut id = id.as_title().to_owned(); in measurement_complete()
610 explanation_str = "No change in performance detected.".to_owned(); in measurement_complete()
618 format!("Performance has {}.", self.green("improved".to_owned())); in measurement_complete()
624 format!("Performance has {}.", self.red("regressed".to_owned())); in measurement_complete()
627 explanation_str = "Change within noise threshold.".to_owned(); in measurement_complete()
818 "group".to_owned(), in test_benchmark_id_make_directory_name_unique()
819 Some("function".to_owned()), in test_benchmark_id_make_directory_name_unique()
820 Some("value".to_owned()), in test_benchmark_id_make_directory_name_unique()
824 directories.insert(existing_id.as_directory_name().to_owned()); in test_benchmark_id_make_directory_name_unique()
[all …]
/external/rust/crates/smallvec/src/
Dtests.rs24 v.push("hello".to_owned()); in test_inline()
25 v.push("there".to_owned()); in test_inline()
26 assert_eq!(&*v, &["hello".to_owned(), "there".to_owned(),][..]); in test_inline()
32 v.push("hello".to_owned()); in test_spill()
34 v.push("there".to_owned()); in test_spill()
35 v.push("burma".to_owned()); in test_spill()
37 v.push("shave".to_owned()); in test_spill()
41 "hello".to_owned(), in test_spill()
42 "there".to_owned(), in test_spill()
43 "burma".to_owned(), in test_spill()
[all …]
/external/rust/cxx/syntax/
Dcheck.rs212 Type::CxxVector(_) => Some("CxxVector<...>".to_owned()), in check_type_ref()
651 "struct".to_owned() in describe()
653 "enum".to_owned() in describe()
655 "C++ type".to_owned() in describe()
657 "opaque C++ type".to_owned() in describe()
659 "opaque Rust type".to_owned() in describe()
661 "C++ string".to_owned() in describe()
663 "C char".to_owned() in describe()
668 Type::RustBox(_) => "Box".to_owned(), in describe()
669 Type::RustVec(_) => "Vec".to_owned(), in describe()
[all …]
/external/rust/crates/rusqlite/src/vtab/
Dcsvtab.rs109 return Err(Error::ModuleError("no CSV file specified".to_owned())); in connect()
114 filename: "".to_owned(), in connect()
134 vtab.filename = value.to_owned(); in connect()
137 schema = Some(value.to_owned()); in connect()
143 "more than one 'columns' parameter".to_owned(), in connect()
147 "must have at least one column".to_owned(), in connect()
202 return Err(Error::ModuleError("no CSV file specified".to_owned())); in connect()
235 return Err(Error::ModuleError("no column specified".to_owned())); in connect()
348 ctx.set_result(&self.cols[col as usize].to_owned()) in column()
/external/rust/crates/codespan-reporting/tests/
Dterm.rs161 … "For more information about this error, try `rustc --explain E0499`.".to_owned(),
297 … x:main::Foo]`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<()>`".to_owned(),
298 "note: required because it appears within the type `Port<()>`".to_owned(),
299 "note: required because it appears within the type `main::Foo`".to_owned(),
300 …se it appears within the type `[closure@no_send_res_ports.rs:29:19: 33:6 x:main::Foo]`".to_owned(),
305 "Some errors have detailed explanations: E0121, E0277, E0666.".to_owned(),
306 … "For more information about an error, try `rustc --explain E0121`.".to_owned(),
358 Diagnostic::error().with_message("a message").with_notes(vec!["a note".to_owned()]),
359 … Diagnostic::warning().with_message("a message").with_notes(vec!["a note".to_owned()]),
360 Diagnostic::note().with_message("a message").with_notes(vec!["a note".to_owned()]),
[all …]
/external/rust/crates/url/src/
Dorigin.rs26 scheme.to_owned(), in url_origin()
27 url.host().unwrap().to_owned(), in url_origin()
78 Origin::Opaque(_) => "null".to_owned(), in ascii_serialization()
92 Origin::Opaque(_) => "null".to_owned(), in unicode_serialization()
/external/rust/crates/nix/test/
Dtest_dir.rs18 .map(|e| e.file_name().to_str().unwrap().to_owned()) in read()
35 let entries1: Vec<_> = dir.iter().map(|e| e.unwrap().file_name().to_owned()).collect(); in rewind()
36 let entries2: Vec<_> = dir.iter().map(|e| e.unwrap().file_name().to_owned()).collect(); in rewind()
37 let entries3: Vec<_> = dir.into_iter().map(|e| e.unwrap().file_name().to_owned()).collect(); in rewind()
/external/rust/crates/clap/src/
Derrors.rs421 let mut v = vec![arg.name().to_owned()]; in argument_conflict()
439 None => c.none("one or more of the other specified arguments".to_owned()), in argument_conflict()
470 info: Some(vec![arg.name().to_owned()]), in empty_value()
516 info: Some(vec![arg.name().to_owned(), bad_val.as_ref().to_owned()]), in invalid_value()
686 info: Some(vec![arg.name().to_owned(), v.to_owned()]), in too_many_values()
720 info: Some(vec![arg.name().to_owned()]), in too_few_values()
784 info: Some(vec![arg.name().to_owned()]), in wrong_number_of_values()
809 info: Some(vec![arg.name().to_owned()]), in unexpected_multiple_usage()
833 "\n".to_owned() in unknown_argument()
/external/rust/crates/protobuf/src/reflect/
Dmessage.rs52 let mut full_name = package.to_owned(); in compute_full_name()
103 .insert(f.proto().get_name().to_owned(), i) in new_non_generic_by_rust_name()
106 .insert(f.proto().get_name().to_owned(), i) in new_non_generic_by_rust_name()
109 let json_name = f.json_name().to_owned(); in new_non_generic_by_rust_name()
167 .insert(f.proto().get_name().to_owned(), i) in new_non_generic_by_pb_name()
170 .insert(f.proto().get_name().to_owned(), i) in new_non_generic_by_pb_name()
173 let json_name = f.json_name().to_owned(); in new_non_generic_by_pb_name()
/external/rust/crates/thiserror/tests/
Dtest_expr.rs84 name: "nightly".to_owned(),
85 component: "clipy".to_owned(),
86 suggestion: Some("clippy".to_owned()),
/external/rust/crates/syn/tests/
Dtest_lit.rs228 Lit::Str(lit) => lit.suffix().to_owned(), in suffix()
229 Lit::ByteStr(lit) => lit.suffix().to_owned(), in suffix()
230 Lit::Byte(lit) => lit.suffix().to_owned(), in suffix()
231 Lit::Char(lit) => lit.suffix().to_owned(), in suffix()
232 Lit::Int(lit) => lit.suffix().to_owned(), in suffix()
233 Lit::Float(lit) => lit.suffix().to_owned(), in suffix()
/external/rust/crates/rusqlite/src/types/
Dto_sql.rs335 (i128::MIN, "min".to_owned()), in test_i128()
336 (-2, "neg two".to_owned()), in test_i128()
337 (-1, "neg one".to_owned()), in test_i128()
338 (0, "zero".to_owned()), in test_i128()
339 (1, "pos one".to_owned()), in test_i128()
340 (2, "pos two".to_owned()), in test_i128()
341 (i128::MAX, "max".to_owned()), in test_i128()
/external/rust/crates/nom/src/
Dinternal.rs110 pub fn to_owned(self) -> Err<(Vec<u8>, ErrorKind)> { in to_owned() method
111 self.map_input(ToOwned::to_owned) in to_owned()
118 pub fn to_owned(self) -> Err<(String, ErrorKind)> { in to_owned() method
119 self.map_input(ToOwned::to_owned) in to_owned()
/external/crosvm/base/src/
Dtube.rs220 test_msg.insert("Red".to_owned(), Event::new().unwrap()); in send_recv_hash_map()
221 test_msg.insert("White".to_owned(), Event::new().unwrap()); in send_recv_hash_map()
222 test_msg.insert("Blue".to_owned(), Event::new().unwrap()); in send_recv_hash_map()
223 test_msg.insert("Orange".to_owned(), Event::new().unwrap()); in send_recv_hash_map()
224 test_msg.insert("Green".to_owned(), Event::new().unwrap()); in send_recv_hash_map()
/external/rust/crates/tokio/src/fs/
Dwrite.rs23 let path = path.as_ref().to_owned(); in write()
24 let contents = contents.as_ref().to_owned(); in write()
Dhard_link.rs42 let src = src.as_ref().to_owned(); in hard_link()
43 let dst = dst.as_ref().to_owned(); in hard_link()
Drename.rs13 let from = from.as_ref().to_owned(); in rename()
14 let to = to.as_ref().to_owned(); in rename()

12345678910