From 2d7a98ab2df1f97e874fdfcf6ccb6616eed66f14 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Mon, 2 Dec 2019 06:44:28 -0800 Subject: [PATCH] removing unused test readme.rs.ignored --- tests/readme.rs.ignored | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 tests/readme.rs.ignored diff --git a/tests/readme.rs.ignored b/tests/readme.rs.ignored deleted file mode 100644 index 9677fd8..0000000 --- a/tests/readme.rs.ignored +++ /dev/null @@ -1,39 +0,0 @@ -#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))] -#![cfg_attr(feature = "nightly", test_runner(my_runner))] -fn my_runner(_: &[()]) { main() } - -use riven::RiotApi; -use riven::consts::Region; - -use tokio::runtime::Runtime; - -fn main() { - let rt = Runtime::new().unwrap(); - - rt.block_on(async { - // Create RiotApi instance from key. - let riot_api = RiotApi::with_key(include_str!("../apikey.txt")); - - // Get summoner data. - let summoner = riot_api.summoner_v4() - .get_by_summoner_name(Region::NA, "잘못").await - .expect("Get summoner failed.") - .expect("Summoner not found."); - - // Print summoner name. - println!("{} Champion Masteries:", summoner.name); - - // Get champion mastery data. - let masteries = riot_api.champion_mastery_v4() - .get_all_champion_masteries(Region::NA, &summoner.id).await - .expect("Get champion masteries failed.") - .unwrap(); - - // Print champioon masteries. - for (i, mastery) in masteries[..10].iter().enumerate() { - println!("{: >2}) {: <9} {: >7} ({})", i + 1, - mastery.champion_id.to_string(), - mastery.champion_points, mastery.champion_level); - } - }); -}