Skip to content
Snippets Groups Projects
Commit 6eec10c8 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

added first code about ownership

parent 22ff4290
No related branches found
No related tags found
No related merge requests found
[package]
name = "library"
version = "0.1.0"
authors = ["Orestis Malaspinas <orestis.malaspinas@hesge.ch>"]
edition = "2018"
[dependencies]
fn do_something(library: Vec<&str>) {
// Do something with the library
}
fn main() {
let mut library = Vec::new();
library.push("Les fleurs du Mal.");
library.push("Rust Programming.");
do_something(library);
do_something(library); // redo something
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment