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 @@ -1176,7 +1176,7 @@ str_newtype!(PackageName);
1176
1176
impl < T : AsRef < str > > PackageName < T > {
1177
1177
/// Validated package name
1178
1178
pub fn new ( name : T ) -> Result < Self , NameValidationError > {
1179
- restricted_names:: validate_package_name ( name. as_ref ( ) , "package name" , "" ) ?;
1179
+ restricted_names:: validate_package_name ( name. as_ref ( ) , "package name" ) ?;
1180
1180
Ok ( Self ( name) )
1181
1181
}
1182
1182
}
@@ -1198,7 +1198,7 @@ str_newtype!(RegistryName);
1198
1198
impl < T : AsRef < str > > RegistryName < T > {
1199
1199
/// Validated registry name
1200
1200
pub fn new ( name : T ) -> Result < Self , NameValidationError > {
1201
- restricted_names:: validate_package_name ( name. as_ref ( ) , "registry name" , "" ) ?;
1201
+ restricted_names:: validate_package_name ( name. as_ref ( ) , "registry name" ) ?;
1202
1202
Ok ( Self ( name) )
1203
1203
}
1204
1204
}
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