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

facet-rs / facet / 15222427616

24 May 2025 02:17AM UTC coverage: 57.627% (-0.02%) from 57.643%
15222427616

Pull #673

github

web-flow
Merge 484c5ddbc into 950e6a37a
Pull Request #673: Add `Shape.type_identifier` to access type name in const contexts

55 of 103 new or added lines in 23 files covered. (53.4%)

4 existing lines in 3 files now uncovered.

9909 of 17195 relevant lines covered (57.63%)

137.44 hits per line

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

0.0
/facet-core/src/impls_std/path.rs
1
use crate::*;
2

3
unsafe impl Facet<'_> for std::path::PathBuf {
4
    const VTABLE: &'static ValueVTable = &const {
5
        value_vtable!(std::path::PathBuf, |f, _opts| write!(
NEW
6
            f,
×
NEW
7
            "{}",
×
NEW
8
            Self::SHAPE.type_identifier
×
9
        ))
10
    };
11

12
    const SHAPE: &'static Shape<'static> = &const {
13
        Shape::builder_for_sized::<Self>()
14
            .type_identifier("PathBuf")
15
            .ty(Type::User(UserType::Opaque))
16
            .def(Def::Scalar(
17
                ScalarDef::builder()
18
                    .affinity(&const { ScalarAffinity::path().build() })
19
                    .build(),
20
            ))
21
            .build()
22
    };
23
}
24

25
unsafe impl Facet<'_> for std::path::Path {
26
    const VTABLE: &'static ValueVTable = &const {
27
        value_vtable_unsized!(std::path::Path, |f, _opts| write!(
NEW
28
            f,
×
NEW
29
            "{}",
×
NEW
30
            Self::SHAPE.type_identifier
×
31
        ))
32
    };
33

34
    const SHAPE: &'static Shape<'static> = &const {
35
        Shape::builder_for_unsized::<Self>()
36
            .type_identifier("Path")
37
            .ty(Type::User(UserType::Opaque))
38
            .def(Def::Scalar(
39
                ScalarDef::builder()
40
                    .affinity(&const { ScalarAffinity::path().build() })
41
                    .build(),
42
            ))
43
            .build()
44
    };
45
}
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