scripty-bot / scripty

Empty call to new() RS-W1079
Anti-pattern
Minor
6 months agoa year old
114		FrameworkError::CommandStructureMismatch {
115			description, ctx, ..
116		} => {
117			let mut args = String::new();118			for param in &ctx.command.parameters {
119				if param.required {
120					write!(&mut args, "<{}> ", param.name)
113	}
114
115	// format the guild counts into a string
116	let mut response = String::new();117	for group in GROUPS {
118		let count = guild_counts.get(&(group.start, group.end)).unwrap_or(&0);
119		// subtract 1 from the end because these ranges are exclusive
138	.fetch_optional(scripty_db::get_db())
139	.await?
140	.map_or_else(
141		|| (String::new(), false, false, false),142		|row| {
143			(
144				row.language,
1/// Convert a &[u8] to a String by hex encoding it.
2pub fn vec_to_hex(vec: &[u8]) -> String {
3	let mut hex = String::new();4	for byte in vec {
5		hex.push_str(&format!("{:02x}", byte));
6	}