Home
last modified time | relevance | path

Searched refs:from_iter (Results 1 – 25 of 93) sorted by relevance

1234

/external/rust/crates/tinyvec/tests/
Dtinyvec.rs43 assert_eq!(Vec::from_iter(tv.clone().drain(..)), vec![1, 2, 3]); in TinyVec_drain()
45 assert_eq!(Vec::from_iter(tv.clone().drain(..2)), vec![1, 2]); in TinyVec_drain()
46 assert_eq!(Vec::from_iter(tv.clone().drain(..3)), vec![1, 2, 3]); in TinyVec_drain()
48 assert_eq!(Vec::from_iter(tv.clone().drain(..=1)), vec![1, 2]); in TinyVec_drain()
49 assert_eq!(Vec::from_iter(tv.clone().drain(..=2)), vec![1, 2, 3]); in TinyVec_drain()
51 assert_eq!(Vec::from_iter(tv.clone().drain(0..)), vec![1, 2, 3]); in TinyVec_drain()
52 assert_eq!(Vec::from_iter(tv.clone().drain(1..)), vec![2, 3]); in TinyVec_drain()
54 assert_eq!(Vec::from_iter(tv.clone().drain(0..2)), vec![1, 2]); in TinyVec_drain()
55 assert_eq!(Vec::from_iter(tv.clone().drain(0..3)), vec![1, 2, 3]); in TinyVec_drain()
56 assert_eq!(Vec::from_iter(tv.clone().drain(1..2)), vec![2]); in TinyVec_drain()
[all …]
Darrayvec.rs177 assert_eq!(Vec::from_iter(av.clone().drain(..)), vec![1, 2, 3]); in ArrayVec_drain()
179 assert_eq!(Vec::from_iter(av.clone().drain(..2)), vec![1, 2]); in ArrayVec_drain()
180 assert_eq!(Vec::from_iter(av.clone().drain(..3)), vec![1, 2, 3]); in ArrayVec_drain()
182 assert_eq!(Vec::from_iter(av.clone().drain(..=1)), vec![1, 2]); in ArrayVec_drain()
183 assert_eq!(Vec::from_iter(av.clone().drain(..=2)), vec![1, 2, 3]); in ArrayVec_drain()
185 assert_eq!(Vec::from_iter(av.clone().drain(0..)), vec![1, 2, 3]); in ArrayVec_drain()
186 assert_eq!(Vec::from_iter(av.clone().drain(1..)), vec![2, 3]); in ArrayVec_drain()
188 assert_eq!(Vec::from_iter(av.clone().drain(0..2)), vec![1, 2]); in ArrayVec_drain()
189 assert_eq!(Vec::from_iter(av.clone().drain(0..3)), vec![1, 2, 3]); in ArrayVec_drain()
190 assert_eq!(Vec::from_iter(av.clone().drain(1..2)), vec![2]); in ArrayVec_drain()
[all …]
/external/rust/crates/structopt/tests/
Darguments.rs18 assert_eq!(Opt { arg: 42 }, Opt::from_iter(&["test", "42"])); in required_argument()
31 assert_eq!(Opt { arg: Some(42) }, Opt::from_iter(&["test", "42"])); in optional_argument()
32 assert_eq!(Opt { arg: None }, Opt::from_iter(&["test"])); in optional_argument()
45 assert_eq!(Opt { arg: 24 }, Opt::from_iter(&["test", "24"])); in argument_with_default()
46 assert_eq!(Opt { arg: 42 }, Opt::from_iter(&["test"])); in argument_with_default()
58 assert_eq!(Opt { arg: vec![24] }, Opt::from_iter(&["test", "24"])); in arguments()
59 assert_eq!(Opt { arg: vec![] }, Opt::from_iter(&["test"])); in arguments()
62 Opt::from_iter(&["test", "24", "42"]) in arguments()
Dflatten.rs29 Opt::from_iter(&["test", "42"]) in flatten()
53 Opt::from_iter(&["test", "42", "43"]); in flatten_twice()
88 Opt::from_iter(&["test", "fetch", "42"]) in flatten_in_subcommand()
95 Opt::from_iter(&["test", "add", "-i", "43"]) in flatten_in_subcommand()
125 Opt::from_iter(&["test", "command1", "42"]) in merge_subcommands_with_flatten()
129 Opt::from_iter(&["test", "command2", "43"]) in merge_subcommands_with_flatten()
154 Struct1::from_iter(&["test", "command", "foo"]); in subcommand_in_flatten()
176 Opt::from_iter(&["test", "42"]) in flatten_doc_comment()
Dskip.rs23 Opt::from_iter(&["test", "-x", "10"]), in skip_1()
48 Opt::from_iter(&["test", "-x", "10", "20", "30"]), in skip_2()
86 Opt::from_iter(&["test", "-n", "10"]), in skip_enum()
116 Opt::from_iter(&["test", "-n", "10"]), in skip_help_doc_comments()
141 Opt::from_iter(&["test", "-n", "10"]), in skip_val()
Dsubcommands.rs189 let result = Opt::from_iter(&["test", "daemon", "start"]); in enum_in_enum_subsubcommand()
208 Opt::from_iter(&["test", "foo"]), in flatten_enum()
232 Opt::from_iter(&["test", "add"]), in external_subcommand()
239 Opt::from_iter(&["test", "remove"]), in external_subcommand()
246 Opt::from_iter(&["test", "git", "status"]), in external_subcommand()
272 Opt::from_iter(&["test", "git", "status"]), in external_subcommand_os_string()
296 Opt::from_iter(&["test", "git", "status"]), in external_subcommand_optional()
302 assert_eq!(Opt::from_iter(&["test"]), Opt { sub: None }); in external_subcommand_optional()
Dcustom-string-parsers.rs236 Opt::from_iter(&["test", "-dfalse"]) in test_custom_bool()
245 Opt::from_iter(&["test", "-dtrue"]) in test_custom_bool()
254 Opt::from_iter(&["test", "-dtrue", "-vfalse"]) in test_custom_bool()
263 Opt::from_iter(&["test", "-dtrue", "-vtrue"]) in test_custom_bool()
272 Opt::from_iter(&["test", "-dtrue", "-tfalse"]) in test_custom_bool()
281 Opt::from_iter(&["test", "-dtrue", "-ttrue"]) in test_custom_bool()
290 Opt::from_iter(&["test", "-dtrue", "-bfalse", "-btrue", "-bfalse", "-bfalse"]) in test_custom_bool()
302 assert_eq!(Opt::from_iter(&["test", "bla"]).c_string.to_bytes(), b"bla"); in test_cstring()
Dspecial_types.rs31 Opt::from_iter(&["test", "success"]) in special_types_bool()
51 Opt::from_iter(&["test", "success"]) in special_types_option()
71 Opt::from_iter(&["test", "success"]) in special_types_vec()
Ddefault_value.rs14 assert_eq!(Opt { arg: 0 }, Opt::from_iter(&["test"])); in auto_default_value()
15 assert_eq!(Opt { arg: 1 }, Opt::from_iter(&["test", "1"])); in auto_default_value()
Ddeny-warnings.rs28 Opt::from_iter(&["test", "foo"]) in warning_never_struct()
45 Opt::from_iter(&["test", "foo", "foo"]) in warning_never_enum()
Doptions.rs124 assert_eq!(Opt { arg: "".into() }, Opt::from_iter(&["test"])); in empy_default_value()
127 Opt::from_iter(&["test", "-afoo"]) in empy_default_value()
148 assert_eq!(Opt { a: None }, Opt::from_iter(&["test"])); in option_from_str()
149 assert_eq!(Opt { a: Some(A) }, Opt::from_iter(&["test", "foo"])); in option_from_str()
/external/rust/crates/syn/tests/
Dtest_expr.rs124 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_func()
146 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_func()
202 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_macro()
229 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_struct()
251 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_match_arm()
256 TokenStream::from_iter(vec![ in test_macro_variable_match_arm()
Dtest_ty.rs21 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_type()
55 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_type()
95 let tokens = TokenStream::from_iter(vec![ in test_group_angle_brackets()
147 let tokens = TokenStream::from_iter(vec![ in test_group_colons()
184 let tokens = TokenStream::from_iter(vec![ in test_group_colons()
Dtest_parse_buffer.rs70 let tokens = TokenStream::from_iter(vec![ in trailing_empty_none_group()
74 TokenStream::from_iter(vec![ in trailing_empty_none_group()
82 TokenStream::from_iter(vec![TokenTree::Group(Group::new( in trailing_empty_none_group()
Dtest_visibility.rs109 let tokens = TokenStream::from_iter(vec![ in test_empty_group_vis()
114 TokenStream::from_iter(vec![ in test_empty_group_vis()
118 TokenStream::from_iter(vec![TokenTree::Ident(Ident::new( in test_empty_group_vis()
Dtest_grouping.rs10 let tokens: TokenStream = TokenStream::from_iter(vec![ in test_grouping()
15 TokenStream::from_iter(vec![ in test_grouping()
Dtest_stmt.rs51 let tokens = TokenStream::from_iter(vec![TokenTree::Group(Group::new( in test_none_group()
53 TokenStream::from_iter(vec![ in test_none_group()
Dtest_item.rs12 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_attr()
125 let tokens = TokenStream::from_iter(vec![ in test_macro_variable_impl()
Dtest_lit.rs253 let tokens = TokenStream::from_iter(vec![TokenTree::Group(Group::new( in test_deep_group_empty()
255 TokenStream::from_iter(vec![TokenTree::Group(Group::new( in test_deep_group_empty()
257 TokenStream::from_iter(vec![TokenTree::Literal(Literal::string("hi"))]), in test_deep_group_empty()
/external/rust/crates/regex-automata/src/
Dtransducer.rs66 Set::from_iter(&["a", "bar", "baz", "wat", "xba", "xbax", "z"]) in dense_anywhere()
76 Set::from_iter(&["a", "bar", "baz", "wat", "xba", "xbax", "z"]) in dense_anchored()
86 Set::from_iter(&["a", "bar", "baz", "wat", "xba", "xbax", "z"]) in sparse_anywhere()
96 Set::from_iter(&["a", "bar", "baz", "wat", "xba", "xbax", "z"]) in sparse_anchored()
/external/rust/crates/proc-macro-hack/src/
Derror.rs20 TokenStream::from_iter(vec![ in compile_error()
29 TokenStream::from_iter(vec![TokenTree::Literal({ in compile_error()
/external/rust/crates/paste/src/
Derror.rs27 TokenStream::from_iter(vec![ in to_compile_error()
36 TokenStream::from_iter(vec![TokenTree::Literal({ in to_compile_error()
/external/rust/crates/rustversion/src/
Dlib.rs261 Ok(TokenStream::from_iter( in try_attr()
266 TokenStream::from_iter(vec![ in try_attr()
270 TokenStream::from_iter( in try_attr()
Derror.rs36 TokenStream::from_iter(vec![ in into_compile_error()
45 TokenStream::from_iter(vec![TokenTree::Literal({ in into_compile_error()
/external/rust/crates/serde_json/src/value/
Dfrom.rs229 fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self { in from_iter() method
245 fn from_iter<I: IntoIterator<Item = (K, V)>>(iter: I) -> Self { in from_iter() method

1234