mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-16 13:30:52 +00:00
Fix typo in name normalization (#7217)
This commit is contained in:
parent
dcbaa1f486
commit
d9cd2829fa
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ use std::fmt::{Display, Formatter};
|
||||||
pub struct DistInfoName<'a>(Cow<'a, str>);
|
pub struct DistInfoName<'a>(Cow<'a, str>);
|
||||||
|
|
||||||
impl<'a> DistInfoName<'a> {
|
impl<'a> DistInfoName<'a> {
|
||||||
/// Create a validated, normalized extra name.
|
/// Create a validated, normalized `.dist-info` directory name.
|
||||||
pub fn new(name: &'a str) -> Self {
|
pub fn new(name: &'a str) -> Self {
|
||||||
if Self::is_normalized(name) {
|
if Self::is_normalized(name) {
|
||||||
Self(Cow::Borrowed(name))
|
Self(Cow::Borrowed(name))
|
||||||
|
|
|
@ -17,7 +17,7 @@ use crate::{validate_and_normalize_owned, validate_and_normalize_ref, InvalidNam
|
||||||
pub struct GroupName(String);
|
pub struct GroupName(String);
|
||||||
|
|
||||||
impl GroupName {
|
impl GroupName {
|
||||||
/// Create a validated, normalized extra name.
|
/// Create a validated, normalized group name.
|
||||||
pub fn new(name: String) -> Result<Self, InvalidNameError> {
|
pub fn new(name: String) -> Result<Self, InvalidNameError> {
|
||||||
validate_and_normalize_owned(name).map(Self)
|
validate_and_normalize_owned(name).map(Self)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue