summaryrefslogtreecommitdiff
path: root/src/ser.rs
diff options
context:
space:
mode:
authorSam Scott <sam@osohq.com>2022-03-05 21:19:28 -0600
committerSam Scott <sam@osohq.com>2022-03-05 21:25:17 -0600
commit4bd3699faba3f00dd8f59a358605abb6e485deb9 (patch)
tree3570c30f8e8f6cd4a1aa1e9b7ec1bf2330c9d33a /src/ser.rs
parent58c1832578a103498b0120469b7a5d84833ad1b5 (diff)
Add error message hint for strict mode.
Diffstat (limited to 'src/ser.rs')
-rw-r--r--src/ser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ser.rs b/src/ser.rs
index e23d677..2e1ea6e 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -10,7 +10,7 @@ use std::fmt::Display;
use std::io::Write;
use std::str;
-const QS_ENCODE_SET: &AsciiSet = &NON_ALPHANUMERIC
+pub const QS_ENCODE_SET: &AsciiSet = &NON_ALPHANUMERIC
.remove(b' ')
.remove(b'*')
.remove(b'-')
@@ -104,7 +104,7 @@ pub struct QsSerializer<'a, W: 'a + Write> {
first: &'a mut bool,
}
-fn replace_space(input: &str) -> Cow<str> {
+pub fn replace_space(input: &str) -> Cow<str> {
match input.as_bytes().iter().position(|&b| b == b' ') {
None => Cow::Borrowed(input),
Some(first_position) => {