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 fileTake it
The walk stopped after 200 commits: lines older than 0f91d0c point at it.
Bump serde from 1.0.174 to 1.0.179dependabot[bot]before adoption0f91d0c
line 1why, one step back1use crate::util::number::Number;refactor: Optimize code based on cargo clippy suggestionsone230sixbefore adoptionc092135
line 2why, one step back2use std::fmt::Display;Bump serde from 1.0.174 to 1.0.179dependabot[bot]before adoption0f91d0c
lines 3–12why, one step back34pub mod range_step;5pub mod tokenize;67#[derive(Debug, Clone, PartialEq, Eq)]8pub enum ParameterValue {9 Text(String),10 Numeric(Number),11}12refactor: Optimize code based on cargo clippy suggestionsone230sixbefore adoptionc092135
lines 13–15why, one step back13impl Display for ParameterValue {14 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {15 let str = match self {Bump serde from 1.0.174 to 1.0.179dependabot[bot]before adoption0f91d0c
lines 16–17why, one step back16 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 back18 };style: simplify string interpolationHamir Mahalbefore adoptionef12632
line 19why, one step back19 write!(f, "{str}")Bump serde from 1.0.174 to 1.0.179dependabot[bot]before adoption0f91d0c
lines 20–23why, one step back20 }21}2223pub type ParameterNameAndValue<'a> = (&'a str, ParameterValue);