@@ -69,7 +69,7 @@ impl Humidity {
6969 /// Calculates Dewpoint from humidity and air temperature using the Magnus-Tetens
7070 /// approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
7171 // standard atmospheric pressure.
72- #[ cfg( not ( feature = "no_std" ) ) ]
72+ #[ cfg( feature = "std" ) ]
7373 pub fn as_dewpoint ( & self , temp : Temperature ) -> Temperature {
7474 let humidity = self . relative_humidity / 100.0 ;
7575 let celsius = temp. as_celsius ( ) ;
@@ -81,7 +81,7 @@ impl Humidity {
8181 /// Calculates Dewpoint from humidity and air temperature using the Magnus-Tetens
8282 /// approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
8383 // standard atmospheric pressure.
84- #[ cfg( feature = "no_std" ) ]
84+ #[ cfg( not ( feature = "std" ) ) ]
8585 pub fn as_dewpoint ( & self , temp : Temperature ) -> Temperature {
8686 let humidity = self . relative_humidity / 100.0 ;
8787 let celsius = temp. as_celsius ( ) ;
@@ -94,7 +94,7 @@ impl Humidity {
9494 /// Calculates the actual vapour pressure in the air, based on the air temperature and humidity
9595 /// at standard atmospheric pressure (1013.25 mb), using the Buck formula (accurate to +/- 0.02%
9696 /// between 0 deg C and 50 deg C)
97- #[ cfg( not ( feature = "no_std" ) ) ]
97+ #[ cfg( feature = "std" ) ]
9898 pub fn as_vapor_pressure ( & self , temp : Temperature ) -> Pressure {
9999 let temp = temp. as_celsius ( ) ;
100100 let saturation_vapor_pressure =
@@ -105,7 +105,7 @@ impl Humidity {
105105 /// Calculates the actual vapour pressure in the air, based on the air temperature and humidity
106106 /// at standard atmospheric pressure (1013.25 mb), using the Buck formula (accurate to +/- 0.02%
107107 /// between 0 deg C and 50 deg C)
108- #[ cfg( feature = "no_std" ) ]
108+ #[ cfg( not ( feature = "std" ) ) ]
109109 pub fn as_vapor_pressure ( & self , temp : Temperature ) -> Pressure {
110110 let temp = temp. as_celsius ( ) ;
111111 let saturation_vapor_pressure =
@@ -125,7 +125,7 @@ impl Humidity {
125125 /// Calculates humidity from dewpoint and air temperature using the Magnus-Tetens
126126 /// Approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
127127 // standard atmospheric pressure.
128- #[ cfg( not ( feature = "no_std" ) ) ]
128+ #[ cfg( feature = "std" ) ]
129129 pub fn from_dewpoint ( dewpoint : Temperature , temp : Temperature ) -> Humidity {
130130 let dewpoint = dewpoint. as_celsius ( ) ;
131131 let temp = temp. as_celsius ( ) ;
@@ -138,7 +138,7 @@ impl Humidity {
138138 /// Calculates humidity from dewpoint and air temperature using the Magnus-Tetens
139139 /// Approximation, with coefficients derived by Alduchov and Eskridge (1996). The formulas assume
140140 // standard atmospheric pressure.
141- #[ cfg( feature = "no_std" ) ]
141+ #[ cfg( not ( feature = "std" ) ) ]
142142 pub fn from_dewpoint ( dewpoint : Temperature , temp : Temperature ) -> Humidity {
143143 let dewpoint = dewpoint. as_celsius ( ) ;
144144 let temp = temp. as_celsius ( ) ;
0 commit comments