We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Display
DistributionType
1 parent 07a14ed commit 3a82cf5Copy full SHA for 3a82cf5
1 file changed
src/distribution.rs
@@ -1,3 +1,4 @@
1
+use std::fmt;
2
use std::io::{BufReader, Read};
3
use std::path::Path;
4
use std::str::FromStr;
@@ -34,6 +35,16 @@ pub struct Distribution {
34
35
python_version: String,
36
}
37
38
+impl fmt::Display for DistributionType {
39
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
40
+ match self {
41
+ DistributionType::SDist => write!(f, "sdist"),
42
+ DistributionType::Egg => write!(f, "bdist_egg"),
43
+ DistributionType::Wheel => write!(f, "bdist_wheel"),
44
+ }
45
46
+}
47
+
48
impl FromStr for SDistType {
49
type Err = Error;
50
0 commit comments