Skip to content

Commit 067ea48

Browse files
committed
clippy fixes
1 parent 3eff2cb commit 067ea48

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

phper/src/classes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,10 +1019,10 @@ unsafe fn add_class_constant(class_ce: *mut _zend_class_entry, constant: &Consta
10191019
match &constant.value {
10201020
Scalar::Null => zend_declare_class_constant_null(class_ce, name_ptr, name_len),
10211021
Scalar::Bool(b) => {
1022-
zend_declare_class_constant_bool(class_ce, name_ptr, name_len, *b as zend_bool)
1022+
zend_declare_class_constant_bool(class_ce, name_ptr, name_len, *b as zend_bool);
10231023
}
10241024
Scalar::I64(i) => {
1025-
zend_declare_class_constant_long(class_ce, name_ptr, name_len, *i as zend_long)
1025+
zend_declare_class_constant_long(class_ce, name_ptr, name_len, *i as zend_long);
10261026
}
10271027
Scalar::F64(f) => zend_declare_class_constant_double(class_ce, name_ptr, name_len, *f),
10281028
Scalar::String(s) => {
@@ -1033,7 +1033,7 @@ unsafe fn add_class_constant(class_ce: *mut _zend_class_entry, constant: &Consta
10331033
name_len,
10341034
s_ptr.cast(),
10351035
s.len(),
1036-
)
1036+
);
10371037
}
10381038
Scalar::Bytes(s) => {
10391039
let s_ptr = s.as_ptr() as *mut u8;
@@ -1043,7 +1043,7 @@ unsafe fn add_class_constant(class_ce: *mut _zend_class_entry, constant: &Consta
10431043
name_len,
10441044
s_ptr.cast(),
10451045
s.len(),
1046-
)
1046+
);
10471047
}
10481048
}
10491049
}

tests/integration/src/classes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn integrate_a(module: &mut Module) {
4040
class.add_constant("CST_TRUE", true);
4141
class.add_constant("CST_FALSE", false);
4242
class.add_constant("CST_INT", 100);
43-
class.add_constant("CST_FLOAT", 3.14159);
43+
class.add_constant("CST_FLOAT", 10.0);
4444

4545
class
4646
.add_method("__construct", Visibility::Public, |this, arguments| {
@@ -173,7 +173,7 @@ fn integrate_i_constants(module: &mut Module) {
173173
interface.add_constant("CST_TRUE", true);
174174
interface.add_constant("CST_FALSE", false);
175175
interface.add_constant("CST_INT", 100);
176-
interface.add_constant("CST_FLOAT", 3.14159);
176+
interface.add_constant("CST_FLOAT", 10.0);
177177

178178
module.add_interface(interface);
179179
}

tests/integration/tests/php/classes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Foo2 extends IntegrationTest\Foo {}
8585
assert_true(true, IntegrationTest\A::CST_TRUE);
8686
assert_false(false, IntegrationTest\A::CST_FALSE);
8787
assert_eq(100, IntegrationTest\A::CST_INT);
88-
assert_eq(3.14159, IntegrationTest\A::CST_FLOAT);
88+
assert_eq(10.0, IntegrationTest\A::CST_FLOAT);
8989

9090
// Test interface constants
9191
assert_true(interface_exists(IntegrationTest\IConstants::class));
@@ -94,4 +94,4 @@ class Foo2 extends IntegrationTest\Foo {}
9494
assert_true(IntegrationTest\IConstants::CST_TRUE);
9595
assert_false(IntegrationTest\IConstants::CST_FALSE);
9696
assert_eq(100, IntegrationTest\IConstants::CST_INT);
97-
assert_eq(3.14159, IntegrationTest\IConstants::CST_FLOAT);
97+
assert_eq(10.0, IntegrationTest\IConstants::CST_FLOAT);

0 commit comments

Comments
 (0)