chore: regex remove default features
This commit is contained in:
parent
54ef7ebac6
commit
3430a0a6ee
3 changed files with 6 additions and 4 deletions
|
@ -11,7 +11,7 @@ indexmap = {version = "2.2", features = ["serde", "rayon"]}
|
|||
log = "0.4"
|
||||
logsy = "1.0.1"
|
||||
rayon = "1.10"
|
||||
regex = "1.11.1"
|
||||
regex = {version = "1.11.1", features = ["std"], default-features = false}
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = {version = "1.0", features = ["preserve_order"]}
|
||||
|
|
|
@ -385,7 +385,8 @@ mod tests {
|
|||
let client = ureq::Agent::config_builder()
|
||||
.user_agent(USER_AGENT_VALUE)
|
||||
.timeout_global(Some(Duration::from_secs(10)))
|
||||
.build().into();
|
||||
.build()
|
||||
.into();
|
||||
let datasource = KBDataSource::new();
|
||||
let champion = ChampionLoL {
|
||||
data: IndexMap::new(),
|
||||
|
@ -399,7 +400,8 @@ mod tests {
|
|||
let client = ureq::Agent::config_builder()
|
||||
.user_agent(USER_AGENT_VALUE)
|
||||
.timeout_global(Some(Duration::from_secs(10)))
|
||||
.build().into();
|
||||
.build()
|
||||
.into();
|
||||
let datasource = KBDataSource::new();
|
||||
let champ = ChampInfo {
|
||||
id: String::from("Annie"),
|
||||
|
|
|
@ -26,7 +26,7 @@ fn get_champ_from_name(champs: &Champion, name: String) -> Option<u32> {
|
|||
}
|
||||
|
||||
fn find_next_number(rest: &str) -> f32 {
|
||||
let re = Regex::new(r"(\d+\.?\d+)").unwrap();
|
||||
let re = Regex::new(r"([0-9]+\.?[0-9]+)").unwrap();
|
||||
if let Some(cap) = re.captures(rest) {
|
||||
if let Some(matched) = cap.get(1) {
|
||||
return matched.as_str().parse::<f32>().unwrap_or(0.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue