Skip to content

Commit

Permalink
better name
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Dec 16, 2023
1 parent bfb3c2a commit efcbcbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::{
const DRAW_GRAPH_PRIORITY: glib::Priority = glib::Priority::DEFAULT_IDLE;
const DRAW_GRAPH_INTERVAL: Duration = Duration::from_secs(1);

static ERROR_MESSAGE_REGEX: Lazy<Regex> =
static SYNTAX_ERROR_REGEX: Lazy<Regex> =
Lazy::new(|| Regex::new(r"syntax error in line (\d+)").expect("Failed to compile regex"));

#[derive(Debug, Clone, Copy)]
Expand Down Expand Up @@ -651,7 +651,7 @@ impl Window {

let message = message.trim();

if let Some(captures) = ERROR_MESSAGE_REGEX.captures(message) {
if let Some(captures) = SYNTAX_ERROR_REGEX.captures(message) {
tracing::trace!("Syntax error: {}", message);

let raw_line_number = captures[1].parse::<u32>().unwrap();
Expand Down

0 comments on commit efcbcbf

Please sign in to comment.