message: Use one of the default README file names if they exist
diff: @@ -1200,7 +1200,7 @@ impl TomlManifest {
  )?;
  let readme = match &project.readme {
  - None => Some(String::from("README.md")),
  + None => default_readme_from_package_root(package_root),
  Some(value) => match value.as_str() {
  "false" => None,
  _ => Some(value.clone())
  @@ -1522,6 +1522,19 @@ impl TomlManifest {
  }
  }
  +const DEFAULT_README_FILES: [&str; 3] = ["README.md", "README.txt", "README"];
  +
  +/// Checks if a file with any of the default README file names exists in the package root.
  +/// If so, returns a String representing that name.
  +fn default_readme_from_package_root(package_root: &Path) -> Option<String> {
  + DEFAULT_README_FILES
  + .iter()
  + .map(|&fname| package_root.join(Path::new(fname)))
  + .filter(|path| path.is_file())
  + .flat_map(|path| path.file_name().map(|fname| fname.to_string_lossy().into_owned()))
  + .nth(0)
  +}
  +
  /// Checks a list of build targets, and ensures the target names are unique within a vector.
  /// If not, the name of the offending build target is returned.
  fn unique_build_targets(targets: &[Target], package_root: &Path) -> Result<(), String> {
  