File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ pub struct TomlProject {
798
798
description : Option < String > ,
799
799
homepage : Option < String > ,
800
800
documentation : Option < String > ,
801
- readme : Option < String > ,
801
+ readme : Option < StringOrBool > ,
802
802
keywords : Option < Vec < String > > ,
803
803
categories : Option < Vec < String > > ,
804
804
license : Option < String > ,
@@ -1518,9 +1518,10 @@ impl TomlManifest {
1518
1518
fn readme_for_project ( package_root : & Path , project : & TomlProject ) -> Option < String > {
1519
1519
match & project. readme {
1520
1520
None => default_readme_from_package_root ( package_root) ,
1521
- Some ( value) => match value. as_str ( ) {
1522
- "false" => None ,
1523
- _ => Some ( value. clone ( ) ) ,
1521
+ Some ( value) => match value {
1522
+ StringOrBool :: Bool ( false ) => None ,
1523
+ StringOrBool :: Bool ( true ) => default_readme_from_package_root ( package_root) ,
1524
+ StringOrBool :: String ( v) => Some ( v. clone ( ) ) ,
1524
1525
} ,
1525
1526
}
1526
1527
}
You can’t perform that action at this time.
0 commit comments