Skip to content

Conversation

@moritz-gross
Copy link
Contributor

@moritz-gross moritz-gross commented Jan 10, 2026

finished up the rest of lazy_static!

the failing linter has nothing to do with my changes i think:

error: static `IS_HEX_BLOCK` is never used
    --> src/canonicalize.rs:2170:11
     |
2170 |             static IS_HEX_BLOCK: LazyLock<Regex> = LazyLock::new(|| Regex::new("[a-eh-z]").unwrap());
     |                    ^^^^^^^^^^^^
     |
     = note: `-D dead-code` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(dead_code)]`

error: static variable `IS_DEGREES_C_or_F` should have an upper case name
    --> src/canonicalize.rs:1377:11
     |
1377 |             static IS_DEGREES_C_or_F: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[°º][CF]").unwrap());
     |                    ^^^^^^^^^^^^^^^^^
     |
     = note: `-D non-upper-case-globals` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(non_upper_case_globals)]`
help: convert the identifier to upper case
     |
1377 -             static IS_DEGREES_C_or_F: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[°º][CF]").unwrap());
1377 +             static IS_DEGREES_C_OR_F: LazyLock<Regex> = LazyLock::new(|| Regex::new(r"[°º][CF]").unwrap());
     |

@moritz-gross moritz-gross changed the title Finish lazy lock Finish LazyLock Jan 10, 2026
Copy link
Collaborator

@NSoiffer NSoiffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It does appear that IS_HEX_BLOCK is no longer used.

@NSoiffer NSoiffer merged commit 02ba7c0 into TalkingCatSW:main Jan 12, 2026
1 of 4 checks passed
@NSoiffer
Copy link
Collaborator

I've pushed the linting issue fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants