diff --git a/src/lib.rs b/src/lib.rs index 33b3567..dd11c51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ pub fn guild_by_prefix(prefix: &str) -> Result, Box> { let top_100: Top100Guilds = serde_json::from_reader(resp)?; - for guild in &top_100.data { + for guild in top_100.data.into_iter() { if guild.prefix == prefix { return Ok(Some(guild)); }