scripty-bot / scripty

Found explicit closure for cloning elements RS-W1206
Anti-pattern
Minor
6 months ago2 years old
Consider using .cloned() instead of .map(|x| x.clone())
263	}
264
265	async fn get_webhook(&self, ctx: &Context, channel: &ChannelId) -> Webhook {
266		let hook = self.webhook_cache.get(channel).map(|x| x.clone());267		if let Some(hook) = hook {
268			return hook;
269		}