mirror of
https://github.com/mii443/tokenizers.git
synced 2025-12-04 11:48:33 +00:00
Fixing 1.47 complaints from clippy.
needless_collect seems to be off because removing them *will* cause some borrow checker complaints. We might be able to correct those better, but probably not everywhere.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
#![warn(clippy::all)]
|
#![warn(clippy::all)]
|
||||||
|
#![allow(clippy::needless_collect)]
|
||||||
#![doc(html_favicon_url = "https://huggingface.co/favicon.ico")]
|
#![doc(html_favicon_url = "https://huggingface.co/favicon.ico")]
|
||||||
#![doc(html_logo_url = "https://huggingface.co/landing/assets/huggingface_logo.svg")]
|
#![doc(html_logo_url = "https://huggingface.co/landing/assets/huggingface_logo.svg")]
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,7 @@ pub fn get_parallelism() -> bool {
|
|||||||
match std::env::var(ENV_VARIABLE) {
|
match std::env::var(ENV_VARIABLE) {
|
||||||
Ok(mut v) => {
|
Ok(mut v) => {
|
||||||
v.make_ascii_lowercase();
|
v.make_ascii_lowercase();
|
||||||
match v.as_ref() {
|
!matches!(v.as_ref(), "" | "off" | "false" | "f" | "no" | "n" | "0")
|
||||||
"" | "off" | "false" | "f" | "no" | "n" | "0" => false,
|
|
||||||
_ => true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Err(_) => true, // If we couldn't get the variable, we use the default
|
Err(_) => true, // If we couldn't get the variable, we use the default
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user