We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
&self
self
1 parent f6ff308 commit 6811049Copy full SHA for 6811049
1 file changed
src/units.rs
@@ -60,19 +60,19 @@ macro_rules! base_unit_struct {
60
}
61
impl $name {
62
/// Returns the underlying f64 value.
63
- pub fn value(self) -> f64 {
+ pub fn value(&self) -> f64 {
64
self.0
65
66
/// Returns true if the value is a normal number.
67
- pub fn is_normal(self) -> bool {
+ pub fn is_normal(&self) -> bool {
68
self.0.is_normal()
69
70
/// Returns true if the value is finite.
71
- pub fn is_finite(self) -> bool {
+ pub fn is_finite(&self) -> bool {
72
self.0.is_finite()
73
74
/// Returns the absolute value of this unit.
75
- pub fn abs(self) -> Self {
+ pub fn abs(&self) -> Self {
76
$name(self.0.abs())
77
78
0 commit comments