This is a project to test out rustdoc.
fn foo() -> i32 {| --- | |
| - name: Install MacOS Packages | |
| hosts: localhost | |
| become: false | |
| vars: | |
| brew_cask_packages: | |
| - docker | |
| - firefox | |
| - google-chrome | |
| - iterm2 |
| $ cargo run | |
| Compiling shared-state v0.1.0 (file:///projects/shared-state) | |
| error[E0382]: use of moved value: `compteur` | |
| --> src/main.rs:9:36 | |
| | | |
| 5 | let compteur = Mutex::new(0); | |
| | -------- move occurs because `compteur` has type `std::sync::Mutex<i32>`, which does not implement the `Copy` trait | |
| ... | |
| 9 | let manipulateur = thread::spawn(move || { | |
| | ^^^^^^^ value moved into closure here, in previous iteration of loop |
| use std::sync::Mutex; | |
| use std::thread; | |
| fn main() { | |
| let compteur = Mutex::new(0); | |
| let mut manipulateurs = vec![]; | |
| for _ in 0..10 { | |
| let manipulateur = thread::spawn(move || { | |
| let mut nombre = compteur.lock().unwrap(); |
This is a project to test out rustdoc.
fn foo() -> i32 {| $ cargo run | |
| Compiling ownership v0.1.0 (file:///projects/ownership) | |
| error[E0382]: borrow of moved value: `s1` | |
| --> src/main.rs:5:28 | |
| | | |
| 2 | let s1 = String::from("hello"); | |
| | -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait | |
| 3 | let s2 = s1; | |
| | -- value moved here | |
| 4 | |
| fn main() { | |
| let s1 = String::from("hello"); | |
| let s2 = s1; | |
| println!("{}, world!", s1); | |
| } |
| campaign_details = campaign_details_daily(args.get('campaign_id'), args.get('month'), args.get('year'), args.get('include_offline')) | |
| final_output = [] | |
| ads = [] | |
| """ put each campaign details in an array """ | |
| for cd in campaign_details: | |
| campaign_detail = CampaignDetail(cd.get("impressions"), cd.get("clicks"), cd.get("date"), cd.get("uniques")) | |
| ads.append(AdBundle(cd.get("ad_id"), cd.get("ad_name"), cd.get("name"), campaign_detail)) | |
| """ divide the array by ad_id """ |