1
Fork 0

Rollup merge of #82483 - tmiasko:option-from-str, r=matthewjasper

Use FromStr trait for number option parsing

Replace `parse_uint` with generic `parse_number` based on `FromStr`.
Use it for parsing inlining threshold to avoid casting later.
This commit is contained in:
Dylan DPC 2021-04-05 13:03:37 +02:00 committed by GitHub
commit e64dbb1f46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 16 deletions

View file

@ -2332,6 +2332,7 @@ crate mod dep_tracking {
impl_dep_tracking_hash_via_hash!(PathBuf);
impl_dep_tracking_hash_via_hash!(lint::Level);
impl_dep_tracking_hash_via_hash!(Option<bool>);
impl_dep_tracking_hash_via_hash!(Option<u32>);
impl_dep_tracking_hash_via_hash!(Option<usize>);
impl_dep_tracking_hash_via_hash!(Option<NonZeroUsize>);
impl_dep_tracking_hash_via_hash!(Option<String>);