You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ This library provides a convenient derive macro for the standard library's
11
11
12
12
```toml
13
13
[dependencies]
14
-
displaydoc = "0.1.4"
14
+
displaydoc = "0.1"
15
15
```
16
16
17
17
*Compiler support: requires rustc 1.31+*
@@ -62,6 +62,9 @@ pub enum DataStoreError {
62
62
1.**Is this crate `no_std` compatible?**
63
63
* Yes! This crate implements the `core::fmt::Display` trait not the `std::fmt::Display` trait so it should work in `std` and `no_std` environments.
64
64
65
+
2.**Does this crate work with `Path` and `PathBuf` via the `Display` trait?**
66
+
* Yuuup. This crate uses @dtolnay's [autoref specialization technique](https://github.com/dtolnay/case-studies/blob/master/autoref-specialization/README.md) to add a special trait for types to get the display impl, it then specializes for `Path` and `PathBuf` and when either of these types are found it calls `self.display()` to get a `std::path::Display<'_>` type which can be used with the Display format specifier!
0 commit comments