From 8f8d29e12537351d793103b82e22316a6bded387 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Wed, 11 Dec 2024 07:55:43 -0500 Subject: [PATCH] Version 0.3.3 --- CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- src/lib.rs | 6 ++++-- src/tokenizer.rs | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d17edc..0fc972c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### Version 0.3.3 + +- Reduce binary size by removing regex dependency (#68) + ### Version 0.3.2 - support ClickHouse/DuckDB join variants diff --git a/Cargo.toml b/Cargo.toml index 8109a4d..82d1bb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlformat" -version = "0.3.2" +version = "0.3.3" authors = ["Josh Holmer "] edition = "2021" rust-version = "1.65" diff --git a/src/lib.rs b/src/lib.rs index 76451a2..5e5d77a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,8 @@ #![forbid(unsafe_code)] // Maintains semver compatibility for older Rust versions #![allow(clippy::manual_strip)] +// This lint is overly pedantic and annoying +#![allow(clippy::needless_lifetimes)] mod formatter; mod indentation; @@ -1710,14 +1712,14 @@ mod tests { #[test] fn it_recognizes_fmt_off() { let input = indoc!( - "SELECT * FROM sometable + "SELECT * FROM sometable WHERE -- comment test here -- fmt: off first_key.second_key = 1 -- json:first_key.second_key = 1 -- fmt: on - AND + AND -- fm1t: off first_key.second_key = 1 -- json:first_key.second_key = 1 diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 25d4a33..5b3fee7 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -478,7 +478,7 @@ fn get_uc_words(input: &str, words: usize) -> String { fn get_top_level_reserved_token<'a>( last_reserved_top_level_token: Option>, -) -> impl FnMut(&'a str) -> IResult<&'a str, Token> { +) -> impl FnMut(&'a str) -> IResult<&'a str, Token<'a>> { move |input: &'a str| { let uc_input: String = get_uc_words(input, 3);