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

facet-rs / facet / 14546339941

19 Apr 2025 06:02AM CUT coverage: 43.858% (+0.2%) from 43.653%
14546339941

Pull #301

github

web-flow
Merge 7525b4cce into 4c26162f7
Pull Request #301: feat(json) Better error messages when a field is missing

20 of 41 new or added lines in 3 files covered. (48.78%)

1 existing line in 1 file now uncovered.

4813 of 10974 relevant lines covered (43.86%)

49.52 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
use core::alloc::Layout;
3
use typeid::ConstTypeId;
4

5
unsafe impl Facet for std::path::PathBuf {
6
    const SHAPE: &'static Shape = &const {
7
        Shape::builder()
8
            .id(ConstTypeId::of::<Self>())
9
            .layout(Layout::new::<Self>())
10
            .def(Def::Scalar(
11
                ScalarDef::builder()
12
                    .affinity(ScalarAffinity::path().build())
13
                    .build(),
14
            ))
15
            .vtable(value_vtable!((), |f, _opts| write!(f, "PathBuf")))
×
16
            .build()
17
    };
18
}
19

20
unsafe impl Facet for &std::path::Path {
21
    const SHAPE: &'static Shape = &const {
22
        Shape::builder()
23
            .id(ConstTypeId::of::<Self>())
24
            .layout(Layout::new::<Self>())
25
            .def(Def::Scalar(
26
                ScalarDef::builder()
27
                    .affinity(ScalarAffinity::path().build())
28
                    .build(),
29
            ))
30
            .vtable(value_vtable!((), |f, _opts| write!(f, "Path")))
×
31
            .build()
32
    };
33
}
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