summaryrefslogtreecommitdiffstats
path: root/vendor/mdbook/src/preprocess/links.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/mdbook/src/preprocess/links.rs')
-rw-r--r--vendor/mdbook/src/preprocess/links.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/mdbook/src/preprocess/links.rs b/vendor/mdbook/src/preprocess/links.rs
index c2c81f522..0af211960 100644
--- a/vendor/mdbook/src/preprocess/links.rs
+++ b/vendor/mdbook/src/preprocess/links.rs
@@ -93,7 +93,7 @@ where
for link in find_links(s) {
replaced.push_str(&s[previous_end_index..link.start_index]);
- match link.render_with_path(&path, chapter_title) {
+ match link.render_with_path(path, chapter_title) {
Ok(new_content) => {
if depth < MAX_LINK_NESTED_DEPTH {
if let Some(rel_path) = link.link_type.relative_path(path) {
@@ -327,7 +327,7 @@ impl<'a> Link<'a> {
let base = base.as_ref();
match self.link_type {
// omit the escape char
- LinkType::Escaped => Ok((&self.link_text[1..]).to_owned()),
+ LinkType::Escaped => Ok(self.link_text[1..].to_owned()),
LinkType::Include(ref pat, ref range_or_anchor) => {
let target = base.join(pat);