diff options
author | Hocdoc <bernhardberger@gmx.at> | 2022-11-10 10:06:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 10:06:43 +0100 |
commit | 34ea2841df53a1aafafb01c887965469344552ba (patch) | |
tree | c21d303bd0ac12bc0b81ba41556694139c5b55a6 /src/util | |
parent | 48823f080218d5a13dbde2ed152b8144de5afef8 (diff) | |
download | markdown-rs-34ea2841df53a1aafafb01c887965469344552ba.tar.gz markdown-rs-34ea2841df53a1aafafb01c887965469344552ba.tar.bz2 markdown-rs-34ea2841df53a1aafafb01c887965469344552ba.zip |
Refactor code-style for Rust 1.65
Closes GH-29.
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Co-authored-by: Bernhard Berger <bernhardberger3456@gmail.com>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/sanitize_uri.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/sanitize_uri.rs b/src/util/sanitize_uri.rs index 96bf33a..c7a646a 100644 --- a/src/util/sanitize_uri.rs +++ b/src/util/sanitize_uri.rs @@ -24,7 +24,7 @@ use alloc::{format, string::String, vec::Vec}; /// * [`micromark-util-sanitize-uri` in `micromark`](https://github.com/micromark/micromark/tree/main/packages/micromark-util-sanitize-uri) #[must_use] pub fn sanitize(value: &str) -> String { - encode(&*normalize(value), true) + encode(&normalize(value), true) } /// Make a value safe for injection as a URL, and check protocols. @@ -71,7 +71,7 @@ pub fn sanitize_with_protocols(value: &str, protocols: &[&str]) -> String { // If it is a protocol, it should be allowed. let protocol = value[0..colon].to_lowercase(); if !protocols.contains(&protocol.as_str()) { - return "".into(); + return String::new(); } } |