Home
last modified time | relevance | path

Searched refs:from_str (Results 1 - 25 of 76) sorted by relevance

1234

/third_party/rust/crates/autocfg/src/
H A Dversion.rs32 return Err(error::from_str("could not execute rustc")); in from_rustc()
39 None => return Err(error::from_str("could not find rustc release")), in from_rustc()
50 let major = try!(iter.next().ok_or(error::from_str("missing major version"))); in from_rustc()
51 let minor = try!(iter.next().ok_or(error::from_str("missing minor version"))); in from_rustc()
52 let patch = try!(iter.next().ok_or(error::from_str("missing patch version"))); in from_rustc()
/third_party/rust/crates/os_str_bytes/tests/
H A Draw_integration.rs42 RawOsStr::from_str("").ends_with_os(RawOsStr::from_str(suffix)), in test_empty_ends_with()
85 RawOsStr::from_str("").starts_with_os(RawOsStr::from_str(prefix)), in test_empty_starts_with()
103 let _ = RawOsStr::from_str("").split(""); in test_split_empty_by_empty()
H A Draw_debug.rs18 test("\"\"", RawOsStr::from_str("")); in test_empty()
33 test("\"foo\\\"bar\"", RawOsStr::from_str("foo\"bar")); in test_quote()
/third_party/rust/crates/clap/tests/derive/
H A Dvalue_enum.rs420 assert!(ArgChoice::from_str("foo", true).is_ok()); in skip_variant()
421 assert!(ArgChoice::from_str("bar", true).is_ok()); in skip_variant()
422 assert!(ArgChoice::from_str("baz", true).is_err()); in skip_variant()
451 assert!(ArgChoice::from_str("foo", true).is_ok()); in skip_non_unit_variant()
452 assert!(ArgChoice::from_str("bar", true).is_ok()); in skip_non_unit_variant()
453 assert!(ArgChoice::from_str("baz", true).is_err()); in skip_non_unit_variant()
466 assert!(ArgChoice::from_str("bar", true).is_err()); in from_str_invalid()
/third_party/python/Tools/stringbench/
H A Dstringbench.py1215 from_str = STR(" ")
1219 s_replace(from_str, to_str)
1236 from_str = STR("\n")
1240 s_replace(from_str, to_str)
1258 from_str = STR("ATC")
1262 seq_replace(from_str, to_str)
1269 from_str = STR("\n")
1273 s_replace(from_str, to_str)
1281 from_str = STR("ee")
1285 s_replace(from_str, to_st
[all...]
/third_party/rust/crates/log/src/kv/
H A Dkey.rs31 Key::from_str(self) in to_key()
43 pub fn from_str(key: &'k str) -> Self { in from_str() functions
108 Key::from_str(s) in from()
120 Key::from_str(self) in from()
126 Key::from_str(self) in from()
170 assert_eq!("a key", Key::from_str("a key").as_str()); in key_from_string()
H A Dsource.rs346 Source::get(&source, Key::from_str("a")).unwrap().to_token() in get()
350 assert!(Source::get(&source, Key::from_str("a")).is_none()); in get()
362 Source::get(&map, Key::from_str("a")).unwrap().to_token() in hash_map()
375 Source::get(&map, Key::from_str("a")).unwrap().to_token() in btree_map()
731 Source::get(source, Key::from_str("a")).unwrap().to_token() in get()
735 Source::get(source, Key::from_str("b")).unwrap().to_token() in get()
737 assert!(Source::get(&source, Key::from_str("c")).is_none()); in get()
740 assert!(Source::get(&source, Key::from_str("a")).is_none()); in get()
/third_party/rust/crates/cxx/gen/cmd/src/syntax/
H A Datom.rs27 Self::from_str(ident.to_string().as_str()) in from()
30 pub fn from_str(s: &str) -> Option<Self> { in from_str() functions
/third_party/rust/crates/cxx/syntax/
H A Datom.rs27 Self::from_str(ident.to_string().as_str()) in from()
30 pub fn from_str(s: &str) -> Option<Self> { in from_str() functions
/third_party/rust/crates/cxx/macro/src/syntax/
H A Datom.rs27 Self::from_str(ident.to_string().as_str()) in from()
30 pub fn from_str(s: &str) -> Option<Self> { in from_str() functions
/third_party/rust/crates/humantime/src/
H A Dwrapper.rs68 fn from_str(s: &str) -> Result<Duration, Self::Err> { in from_str() functions
98 fn from_str(s: &str) -> Result<Timestamp, Self::Err> { in from_str() functions
/third_party/rust/crates/cxx/gen/lib/src/syntax/
H A Datom.rs27 Self::from_str(ident.to_string().as_str()) in from()
30 pub fn from_str(s: &str) -> Option<Self> { in from_str() functions
/third_party/rust/crates/cxx/gen/build/src/syntax/
H A Datom.rs27 Self::from_str(ident.to_string().as_str()) in from()
30 pub fn from_str(s: &str) -> Option<Self> { in from_str() functions
/third_party/rust/crates/bindgen/bindgen/codegen/
H A Dhelpers.rs23 .map(|one| TokenStream::from_str(one).expect("repr to be valid")); in repr_list()
33 .map(|one| TokenStream::from_str(one).expect("derive to be valid")); in derives()
145 let prefix = TokenStream::from_str(prefix.as_str()).unwrap(); in c_void()
166 let prefix = TokenStream::from_str(prefix.as_str()).unwrap(); in raw_type()
/third_party/rust/crates/rust-cexpr/tests/
H A Dclang.rs33 .and_then(|v| i64::from_str(&v).ok()) in test_definition()
81 .and_then(|v| f64::from_str(&v).ok()) in test_definition()
86 .and_then(|v| u64::from_str(v).ok()) in test_definition()
92 .and_then(|v| u32::from_str(v).ok()) in test_definition()
/third_party/rust/crates/rustix/tests/net/
H A Dunix.rs63 sum += i32::from_str(&String::from_utf8_lossy(&buffer[..nread])).unwrap(); in server()
100 i32::from_str(&String::from_utf8_lossy(&buffer[..nread])).unwrap(), in client()
/third_party/python/Tools/c-analyzer/c_parser/
H A Dinfo.py392 vartype, storage = VarType.from_str(decl)
843 def from_str(cls, text): member in VarType
923 vartype, storage = VarType.from_str(datastr)
927 vartype, storage = VarType.from_str(datastr)
956 def from_str(cls, text): member in Signature
1050 sig, storage = Signature.from_str(sig)
1054 sig, storage = Signature.from_str(sig)
1133 vartype, _ = VarType.from_str(datastr)
1137 vartype, _ = VarType.from_str(datastr)
1171 def from_str(cl member in Member
[all...]
/third_party/rust/crates/syn/codegen/src/
H A Dversion.rs10 let parsed: Manifest = toml::from_str(&manifest)?; in get()
H A Djson.rs10 let check: Definitions = serde_json::from_str(&j)?; in generate()
/third_party/rust/crates/nix/test/sys/
H A Dtest_socket.rs21 let actual: net::SocketAddr = FromStr::from_str("127.0.0.1:3000").unwrap(); in test_inetv4_addr_to_sock_addr()
47 let actual: net::SocketAddr = FromStr::from_str("127.0.0.1:3000").unwrap(); in test_inetv4_addr_roundtrip_sockaddr_storage_to_addr()
82 let sock_addr = SockaddrIn::from_str("127.0.0.1:6790").unwrap(); in test_timestamping()
305 let std_sa = SocketAddrV4::from_str("127.0.0.1:6789").unwrap(); in test_std_conversions()
309 let std_sa = SocketAddrV6::from_str("[::1]:6000").unwrap(); in test_std_conversions()
369 let std_sa = SocketAddrV4::from_str("127.0.0.1:6789").unwrap(); in udp()
495 let std_sa = SocketAddrV4::from_str("127.0.0.1:6793").unwrap(); in udp_sendmmsg()
496 let std_sa2 = SocketAddrV4::from_str("127.0.0.1:6794").unwrap(); in udp_sendmmsg()
566 let inet_addr = SocketAddrV4::from_str("127.0.0.1:6798").unwrap(); in udp_recvmmsg()
637 let inet_addr = SocketAddrV4::from_str("127. in udp_recvmmsg_dontwait_short_read()
[all...]
/third_party/rust/crates/clap/examples/tutorial_builder/
H A D04_01_enum.rs35 fn from_str(s: &str) -> Result<Self, Self::Err> { in fmt() functions
/third_party/rust/crates/clap/src/builder/
H A Dvalue_hint.rs77 fn from_str(s: &str) -> Result<Self, <Self as FromStr>::Err> { in from_str() functions
/third_party/rust/crates/bindgen/bindgen/
H A Dfeatures.rs45 fn from_str(s: &str) -> Result<Self, Self::Err> { in from_str() functions
305 assert_eq!(target, RustTarget::from_str(target_str).unwrap()); in test_target()
/third_party/rust/crates/syn/benches/
H A Dfile.rs35 TokenStream::from_str(&content).unwrap() in get_tokens()
/third_party/rust/crates/syn/tests/
H A Dtest_ident.rs6 syn::parse2(TokenStream::from_str(s).unwrap()) in parse()

Completed in 18 milliseconds

1234