Outils pour utilisateurs

Outils du site


tech:notes_rust_lang

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:notes_rust_lang [2026/06/07 19:12] – modification externe 127.0.0.1tech:notes_rust_lang [2026/11/16 09:20] (Version actuelle) – Jean-Baptiste
Ligne 1: Ligne 1:
 <!DOCTYPE markdown> <!DOCTYPE markdown>
-{{tag>Brouillon}}+{{tag>Brouillon Lang Rust}}
  
 # Notes rust lang # Notes rust lang
Ligne 6: Ligne 6:
 Voir aussi : Voir aussi :
 * [[Notes go golang]] * [[Notes go golang]]
-* [[https://fr.wikipedia.org/wiki/Zig_(langage)]]+* <https://fr.wikipedia.org/wiki/Zig_(langage)>
 * V, Odin, Vale * V, Odin, Vale
  
Ligne 19: Ligne 19:
 export RUST_BACKTRACE=1 export RUST_BACKTRACE=1
 ~~~ ~~~
 +
 +Format
 +~~~bash
 +cargo fmt  --verbose --check
 +cargo fmt
 +~~~
 +
 +Lint
 +~~~bash
 +cargo clippy
 +~~~
 +
 +
 +## Langage
 +
 +~~~rust
 +fn plop(n: u32) -> u32 {
 +    let ret: u32;
 +    if n > 5 {
 +        ret = 10;
 +    } else {
 +        ret = 20;
 +    };
 +    return ret
 +}
 +~~~
 +
 +~~~rust
 +fn plop(n: u32) -> u32 {
 +    let ret = if n > 5 {
 +        10u32
 +    } else {
 +        20u32
 +    };
 +    return ret
 +}
 +~~~
 +
  
  
tech/notes_rust_lang.1780852327.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki