Skip to content
Myr

mod.rs

This file

Path

src/parameter/mod.rs

23 lines · 579 bytes · Rust

Last changed by

style: simplify string interpolationHamir Mahalbefore adoptionef12632

History of this file

Take it

The walk stopped after 200 commits: lines older than bf9644d point at it.

Add regression test for #640David Peterbefore adoptionbf9644d

line 1why, one step back
1use crate::util::number::Number;

refactor: Optimize code based on cargo clippy suggestionsone230sixbefore adoptionc092135

line 2why, one step back
2use std::fmt::Display;

Add regression test for #640David Peterbefore adoptionbf9644d

lines 3–12why, one step back
3
4pub mod range_step;5pub mod tokenize;67#[derive(Debug, Clone, PartialEq, Eq)]8pub enum ParameterValue {9 Text(String),10 Numeric(Number),11}12

refactor: Optimize code based on cargo clippy suggestionsone230sixbefore adoptionc092135

lines 13–15why, one step back
13impl Display for ParameterValue {
14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {15 let str = match self {

Add regression test for #640David Peterbefore adoptionbf9644d

lines 16–17why, one step back
16 ParameterValue::Text(ref value) => value.clone(),
17 ParameterValue::Numeric(value) => value.to_string(),

refactor: Optimize code based on cargo clippy suggestionsone230sixbefore adoptionc092135

line 18why, one step back
18 };

style: simplify string interpolationHamir Mahalbefore adoptionef12632

line 19why, one step back
19 write!(f, "{str}")

Add regression test for #640David Peterbefore adoptionbf9644d

lines 20–23why, one step back
20 }
21}2223pub type ParameterNameAndValue<'a> = (&'a str, ParameterValue);