macroquad_server_handler 0.1.0

A lightweight multiplayer server handler for Macroquad. Built by me — feedback and improvement tips are always welcome!
Documentation
1
2
3
4
5
6
7
8
9
10
use std::fmt::Display;

pub fn format_vector<T: Display>(vec: &Vec<T>) -> String {
    let formatted = vec
        .iter()
        .map(|item| item.to_string()) // convert each item to string
        .collect::<Vec<String>>()     // collect into a Vec<String>
        .join(", ");                  // join with commas
    format!("[{}]", formatted)       // wrap in brackets
}