From 1a3f8911005af479e47a4323947f27abfb525f47 Mon Sep 17 00:00:00 2001 From: Fedor Tolstonozhenko Date: Tue, 24 Sep 2024 20:35:11 +0200 Subject: [PATCH] Rename AsciiSet constant --- crates/opensi-core/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/opensi-core/src/lib.rs b/crates/opensi-core/src/lib.rs index bc6a096..2403973 100644 --- a/crates/opensi-core/src/lib.rs +++ b/crates/opensi-core/src/lib.rs @@ -128,7 +128,7 @@ pub enum Resource { } use percent_encoding::{utf8_percent_encode, AsciiSet, CONTROLS}; -const FRAGMENT: &AsciiSet = &CONTROLS.add(b' '); +const CONTROLS_ASCII_SET: &AsciiSet = &CONTROLS.add(b' '); impl Atom { pub fn get_resource(&self, filename: &str) -> Option { @@ -145,7 +145,7 @@ impl Atom { // It also percent-encoded so we need to decode links. let body = self.body.as_ref()?; - let resource_name = &utf8_percent_encode(body, FRAGMENT).to_string(); + let resource_name = &utf8_percent_encode(body, CONTROLS_ASCII_SET).to_string(); let tmp = std::env::temp_dir().join(filename); let variant: &str = self.variant.as_ref()?;