printer: drop dependency on base64 crate

Instead, we just roll our own. A slow version of this is pretty simple
to do, and that's what we write here. The `base64` crate supports a lot
more functionality and is quite fast, but we care about neither of those
things for this particular aspect of ripgrep. (base64 is only used for
non-UTF-8 data or file paths, which are both quite rare.)
This commit is contained in:
Andrew Gallant
2023-11-21 13:35:45 -05:00
parent 9c84575229
commit ae2a09915f
3 changed files with 77 additions and 12 deletions

7
Cargo.lock generated
View File

@@ -23,12 +23,6 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "base64"
version = "0.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2"
[[package]]
name = "bstr"
version = "1.7.0"
@@ -185,7 +179,6 @@ dependencies = [
name = "grep-printer"
version = "0.1.7"
dependencies = [
"base64",
"bstr",
"grep-matcher",
"grep-regex",