Is there a faster/shorter way to initialize variables in a Rust struct?
You can provide default values for your struct by implementing the Default trait. The default function would look like your current new function: impl Default for cParams { fn default() -> cParams { cParams { iInsertMax: -1, iUpdateMax: -1, iDeleteMax: -1, iInstanceMax: -1, tFirstInstance: false, tCreateTables: false, tContinue: false, } } } You can then … Read more