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

mises a jour diverses

parent 41eedb11
Branches
No related tags found
No related merge requests found
Pipeline #5677 passed
fn do_something(_notebook: Vec<&str>) { // _notebook prend l'ownership
fn do_something(_notebook: Vec<String>) { // _notebook prend l'ownership
// Do something with the library
} // _notebook est détruit et ses données aussi
fn main() {
let mut notebook = Vec::new(); // par défaut notebook est immutable
notebook.push("Il fait beau.");
notebook.push("Les oiseaux chantent.");
notebook.push(String::from("Il fait beau."));
notebook.push(String::from("Les oiseaux chantent."));
do_something(notebook); // ownership transféré à do_something
// do_something(notebook); // redo something
}
\ No newline at end of file
let a = 1;
let raw = &a as *const i32;
let b = unsafe {
*raw
};
println!("{}", unsafe { *raw });
}
......@@ -16,7 +16,7 @@ pdfMaxPagesPerSlide:
- Rendu public la première fois en 2012 (version 0.4).
- Première version stable (1.0) en 2015.
- Stabilisation de fonctionnalités tous les 6 semaines.
- Version stable actuelle 1.31.1 <!-- TODO UPDATE -->
- Version stable actuelle 1.32. <!-- TODO UPDATE -->
## Un développement pragmatique
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment