Move 'PackageName' and associated methods in its own module.

This is a bit cleaner, as the 'cmd/new' had many on-the-fly functions
  which are better scoped inside this module.

  Plus, it plays nicely with the std::str::FromStr trait definition.
This commit is contained in:
KtorZ
2023-01-14 22:01:55 +01:00
parent bfeb26c9a9
commit 0771ab24bd
12 changed files with 174 additions and 169 deletions

View File

@@ -4,8 +4,8 @@ use futures::future;
use reqwest::Client;
use crate::{
config::PackageName,
error::Error,
package_name::PackageName,
paths::{self, CacheKey},
};

View File

@@ -5,8 +5,9 @@ use miette::NamedSource;
use serde::{Deserialize, Serialize};
use crate::{
config::{Config, Dependency, PackageName, Platform},
config::{Config, Dependency, Platform},
error::Error,
package_name::PackageName,
paths,
telemetry::{Event, EventListener},
};