• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

davidcole1340 / ext-php-rs / 14501981872

16 Apr 2025 08:30PM UTC coverage: 14.129% (+0.7%) from 13.479%
14501981872

push

github

web-flow
style(clippy): apply pedantic rules

Refs: #418

41 of 345 new or added lines in 46 files covered. (11.88%)

48 existing lines in 25 files now uncovered.

553 of 3914 relevant lines covered (14.13%)

1.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/types/mod.rs
1
//! Types defined by the Zend engine used in PHP.
2
//!
3
//! Generally, it is easier to work directly with Rust types, converting into
4
//! these PHP types when required.
5

6
mod array;
7
mod callable;
8
mod class_object;
9
mod iterable;
10
mod iterator;
11
mod long;
12
mod object;
13
mod string;
14
mod zval;
15

16
pub use array::{ArrayKey, ZendHashTable};
17
pub use callable::ZendCallable;
18
pub use class_object::ZendClassObject;
19
pub use iterable::Iterable;
20
pub use iterator::ZendIterator;
21
pub use long::ZendLong;
22
pub use object::{PropertyQuery, ZendObject};
23
pub use string::ZendStr;
24
pub use zval::Zval;
25

26
use crate::{convert::FromZval, flags::DataType, macros::into_zval};
27

28
into_zval!(f32, set_double, Double);
29
into_zval!(f64, set_double, Double);
30
into_zval!(bool, set_bool, Bool);
31

32
try_from_zval!(f64, double, Double);
33
try_from_zval!(bool, bool, Bool);
34

35
impl FromZval<'_> for f32 {
36
    const TYPE: DataType = DataType::Double;
37

38
    fn from_zval(zval: &Zval) -> Option<Self> {
×
39
        #[allow(clippy::cast_possible_truncation)]
UNCOV
40
        zval.double().map(|v| v as f32)
×
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc