mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Remove implicit clone from ExtraName
and document requirement in PackageName
(#262)
per discussion in #137
1169000261
This commit is contained in:
parent
0dc7e6335e
commit
4be9ba483f
2 changed files with 1 additions and 6 deletions
|
@ -7,12 +7,6 @@ use regex::Regex;
|
|||
#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct ExtraName(String);
|
||||
|
||||
impl From<&ExtraName> for ExtraName {
|
||||
fn from(extra_name: &ExtraName) -> Self {
|
||||
extra_name.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for ExtraName {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
self.0.fmt(f)
|
||||
|
|
|
@ -10,6 +10,7 @@ use crate::dist_info_name::DistInfoName;
|
|||
pub struct PackageName(String);
|
||||
|
||||
impl From<&PackageName> for PackageName {
|
||||
/// Required for `WaitMap::wait`
|
||||
fn from(package_name: &PackageName) -> Self {
|
||||
package_name.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue