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

davidcole1340 / ext-php-rs / 16880353614

11 Aug 2025 12:42PM UTC coverage: 26.825% (-1.0%) from 27.778%
16880353614

Pull #533

github

web-flow
Merge 9e9410bbe into 896cb945d
Pull Request #533: Feat/interface impl

8 of 179 new or added lines in 9 files covered. (4.47%)

2 existing lines in 2 files now uncovered.

1161 of 4328 relevant lines covered (26.83%)

7.42 hits per line

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

58.33
/crates/macros/src/helpers.rs
1
use crate::prelude::*;
2
use syn::{Attribute, Expr, Lit, Meta};
3

4
/// Takes a list of attributes and returns a list of doc comments retrieved from
5
/// the attributes.
6
pub fn get_docs(attrs: &[Attribute]) -> Result<Vec<String>> {
11✔
7
    attrs
11✔
8
        .iter()
9
        .filter(|attr| attr.path().is_ident("doc"))
26✔
10
        .map(|attr| {
16✔
11
            let Meta::NameValue(meta) = &attr.meta else {
10✔
12
                bail!(attr.meta => "Invalid format for `#[doc]` attribute.");
×
13
            };
14

15
            let Expr::Lit(value) = &meta.value else {
5✔
16
                bail!(attr.meta => "Invalid format for `#[doc]` attribute.");
×
17
            };
18

19
            let Lit::Str(doc) = &value.lit else {
5✔
20
                bail!(value.lit => "Invalid format for `#[doc]` attribute.");
×
21
            };
22

23
            Ok(doc.value())
24
        })
25
        .collect::<Result<Vec<_>>>()
26
}
27

28
pub trait CleanPhpAttr {
29
    fn clean_php(&mut self);
30
}
31

32
impl CleanPhpAttr for Vec<Attribute> {
NEW
33
    fn clean_php(&mut self) {
×
NEW
34
        self.retain(|attr| !attr.path().is_ident("php"));
×
35
    }
36
}
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

© 2025 Coveralls, Inc