summaryrefslogtreecommitdiffstats
path: root/vendor/mdbook/src/preprocess/links.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/mdbook/src/preprocess/links.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);