daily pastebin goal
95%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::path::{Path, PathBuf};
  2. fn main() {
  3.     let paths = vec![PathBuf::from("foo"), PathBuf::from("bar")];
  4.     takes_paths(&paths[..]);
  5. }
  6.  
  7. fn takes_paths(s: &[PathBuf]) {
  8.     for p in s.iter() {
  9.         println!("{:?}", p);
  10.     }
  11. }
RAW Paste Data
Top