test.rs 811 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. */
  5. use std::collections::HashMap;
  6. use std::collections::VecDeque;
  7. use std::cell::RefCell;
  8. fn main() {
  9. let mut vector = Vec::from([1, 2, 3, 4]);
  10. vector.push(12);
  11. let mut map: HashMap<&str, f64> = HashMap::from([
  12. ("Mercury", 0.4),
  13. ("Venus", 0.7),
  14. ("Earth", 1.0),
  15. ("Mars", 1.5),
  16. ]);
  17. map.insert("Venus", 2.5);
  18. map.insert("Sun", 312.2);
  19. let string = "this is a string";
  20. let tmp = String::from("hello world");
  21. let slice = &tmp[1..5];
  22. let mut deque = VecDeque::from([1, 2, 3]);
  23. deque.push_back(4);
  24. deque.push_back(5);
  25. let ref_cell = RefCell::new(5);
  26. println!("Hello, world!"); // BP_MARKER_1
  27. }