File tree 2 files changed +3
-3
lines changed
crates/cargo-util-schemas/src
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1175,7 +1175,7 @@ str_newtype!(PackageName);
1175
1175
impl < T : AsRef < str > > PackageName < T > {
1176
1176
/// Validated package name
1177
1177
pub fn new ( name : T ) -> Result < Self , NameValidationError > {
1178
- restricted_names:: validate_package_name ( name. as_ref ( ) , "package name" , "" ) ?;
1178
+ restricted_names:: validate_package_name ( name. as_ref ( ) , "package name" ) ?;
1179
1179
Ok ( Self ( name) )
1180
1180
}
1181
1181
}
@@ -1197,7 +1197,7 @@ str_newtype!(RegistryName);
1197
1197
impl < T : AsRef < str > > RegistryName < T > {
1198
1198
/// Validated registry name
1199
1199
pub fn new ( name : T ) -> Result < Self , NameValidationError > {
1200
- restricted_names:: validate_package_name ( name. as_ref ( ) , "registry name" , "" ) ?;
1200
+ restricted_names:: validate_package_name ( name. as_ref ( ) , "registry name" ) ?;
1201
1201
Ok ( Self ( name) )
1202
1202
}
1203
1203
}
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ pub enum NameValidationError {
34
34
/// level of sanity. Note that package names have other restrictions
35
35
/// elsewhere. `cargo new` has a few restrictions, such as checking for
36
36
/// reserved names. crates.io has even more restrictions.
37
- pub fn validate_package_name ( name : & str , what : & ' static str , help : & str ) -> Result < ( ) > {
37
+ pub fn validate_package_name ( name : & str , what : & ' static str ) -> Result < ( ) > {
38
38
if name. is_empty ( ) {
39
39
return Err ( NameValidationError :: Empty ( what) ) ;
40
40
}
You can’t perform that action at this time.
0 commit comments