Skip to content

Commit

Permalink
Regex & Message Adjustment
Browse files Browse the repository at this point in the history
\d -> [0-9]
  • Loading branch information
Scotsguy committed Jan 9, 2020
1 parent 5574724 commit 2236762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parsers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub static PARSERS: [Check; 8] = [
fn multimc_in_program_files(log: &str) -> Option<(&str, String)> {
const TRIGGER: &str = "Minecraft folder is:\nC:/Program Files";
if log.contains(TRIGGER) {
Some(("‼", "Your MultiMC installation is in Program Files, where MultiMC doesn't have permission to write.\nMove it somewhere else, like your Desktop.".to_string()))
Some(("‼", "Your MultiMC installation is in Program Files, where MultiMC doesn't have permission to write.\nYou should move it somewhere else, like your Desktop.".to_string()))
} else {
None
}
Expand Down Expand Up @@ -103,7 +103,7 @@ fn java_architecture(log: &str) -> Option<(&str, String)> {

fn ram_amount(log: &str) -> Option<(&str, String)> {
lazy_static! {
static ref RE: Regex = Regex::new(r"-Xmx(?P<amount>\d+)m[,\]]").unwrap();
static ref RE: Regex = Regex::new(r"-Xmx(?P<amount>[0-9]+)m[,\]]").unwrap();
}
if let Some(capture) = RE.captures(log) {
let amount = capture.name("amount")?.as_str().parse::<f32>();
Expand Down

0 comments on commit 2236762

Please sign in to comment.