@@ -56,50 +56,50 @@ impl fmt::Display for StatsError {
5656 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
5757 match * self {
5858 StatsError :: BadParams => write ! ( f, "Bad distribution parameters" ) ,
59- StatsError :: ArgFinite ( s) => write ! ( f, "Argument {} must be finite" , s ) ,
60- StatsError :: ArgMustBePositive ( s) => write ! ( f, "Argument {} must be positive" , s ) ,
61- StatsError :: ArgNotNegative ( s) => write ! ( f, "Argument {} must be non-negative" , s ) ,
59+ StatsError :: ArgFinite ( s) => write ! ( f, "Argument {s } must be finite" ) ,
60+ StatsError :: ArgMustBePositive ( s) => write ! ( f, "Argument {s } must be positive" ) ,
61+ StatsError :: ArgNotNegative ( s) => write ! ( f, "Argument {s } must be non-negative" ) ,
6262 StatsError :: ArgIntervalIncl ( s, min, max) => {
63- write ! ( f, "Argument {} not within interval [{}, {}]" , s , min , max )
63+ write ! ( f, "Argument {s } not within interval [{min }, {max }]" )
6464 }
6565 StatsError :: ArgIntervalExcl ( s, min, max) => {
66- write ! ( f, "Argument {} not within interval ({}, {})" , s , min , max )
66+ write ! ( f, "Argument {s } not within interval ({min }, {max })" )
6767 }
6868 StatsError :: ArgIntervalExclMin ( s, min, max) => {
69- write ! ( f, "Argument {} not within interval ({}, {}]" , s , min , max )
69+ write ! ( f, "Argument {s } not within interval ({min }, {max }]" )
7070 }
7171 StatsError :: ArgIntervalExclMax ( s, min, max) => {
72- write ! ( f, "Argument {} not within interval [{}, {})" , s , min , max )
72+ write ! ( f, "Argument {s } not within interval [{min }, {max })" )
7373 }
74- StatsError :: ArgGt ( s, val) => write ! ( f, "Argument {} must be greater than {}" , s , val ) ,
74+ StatsError :: ArgGt ( s, val) => write ! ( f, "Argument {s } must be greater than {val}" ) ,
7575 StatsError :: ArgGtArg ( s, val) => {
76- write ! ( f, "Argument {} must be greater than {}" , s , val )
76+ write ! ( f, "Argument {s } must be greater than {val}" )
7777 }
7878 StatsError :: ArgGte ( s, val) => {
79- write ! ( f, "Argument {} must be greater than or equal to {}" , s , val )
79+ write ! ( f, "Argument {s } must be greater than or equal to {val}" )
8080 }
8181 StatsError :: ArgGteArg ( s, val) => {
82- write ! ( f, "Argument {} must be greater than or equal to {}" , s , val )
82+ write ! ( f, "Argument {s } must be greater than or equal to {val}" )
8383 }
84- StatsError :: ArgLt ( s, val) => write ! ( f, "Argument {} must be less than {}" , s , val ) ,
85- StatsError :: ArgLtArg ( s, val) => write ! ( f, "Argument {} must be less than {}" , s , val ) ,
84+ StatsError :: ArgLt ( s, val) => write ! ( f, "Argument {s } must be less than {val}" ) ,
85+ StatsError :: ArgLtArg ( s, val) => write ! ( f, "Argument {s } must be less than {val}" ) ,
8686 StatsError :: ArgLte ( s, val) => {
87- write ! ( f, "Argument {} must be less than or equal to {}" , s , val )
87+ write ! ( f, "Argument {s } must be less than or equal to {val}" )
8888 }
8989 StatsError :: ArgLteArg ( s, val) => {
90- write ! ( f, "Argument {} must be less than or equal to {}" , s , val )
90+ write ! ( f, "Argument {s } must be less than or equal to {val}" )
9191 }
9292 StatsError :: ContainersMustBeSameLength => {
9393 write ! ( f, "Expected containers of same length" )
9494 }
9595 StatsError :: ComputationFailedToConverge => write ! ( f, "Computation failed to converge" ) ,
9696 StatsError :: ContainerExpectedSum ( s, sum) => {
97- write ! ( f, "Elements in container {} expected to sum to {}" , s , sum )
97+ write ! ( f, "Elements in container {s } expected to sum to {sum}" )
9898 }
9999 StatsError :: ContainerExpectedSumVar ( s, sum) => {
100- write ! ( f, "Elements in container {} expected to sum to {}" , s , sum )
100+ write ! ( f, "Elements in container {s } expected to sum to {sum}" )
101101 }
102- StatsError :: SpecialCase ( s) => write ! ( f, "{}" , s ) ,
102+ StatsError :: SpecialCase ( s) => write ! ( f, "{s}" ) ,
103103 }
104104 }
105105}
0 commit comments