[PR #270] [MERGED] refine: Remove one clone on assets_prefix #541

Closed
opened 2026-04-08 16:53:21 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sigoden/dufs/pull/270
Author: @TieWay59
Created: 10/2/2023
Status: Merged
Merged: 10/5/2023
Merged by: @sigoden

Base: mainHead: reduce-one-clone


📝 Commits (1)

  • 0f92f07 refine: Remove one clone on assets_prefix

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/server.rs (+2 -2)

📄 Description

This clone is not consist with the usage of assets_prefix in following
code and it's unnecessary.

ref:

if let Some(name) = req_path.strip_prefix(&self.assets_prefix) {

.replace("__ASSETS_PREFIX__", &self.assets_prefix)

Signed-off-by: TieWay59 tieway59@foxmail.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sigoden/dufs/pull/270 **Author:** [@TieWay59](https://github.com/TieWay59) **Created:** 10/2/2023 **Status:** ✅ Merged **Merged:** 10/5/2023 **Merged by:** [@sigoden](https://github.com/sigoden) **Base:** `main` ← **Head:** `reduce-one-clone` --- ### 📝 Commits (1) - [`0f92f07`](https://github.com/sigoden/dufs/commit/0f92f07e32ca7103c2ef5df171142682f07d173a) refine: Remove one clone on `assets_prefix` ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/server.rs` (+2 -2) </details> ### 📄 Description This clone is not consist with the usage of `assets_prefix` in following code and it's unnecessary. ref: `if let Some(name) = req_path.strip_prefix(&self.assets_prefix) {` `.replace("__ASSETS_PREFIX__", &self.assets_prefix)` Signed-off-by: TieWay59 <tieway59@foxmail.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-04-08 16:53:21 +03:00
zhus closed this issue 2026-04-08 16:53:21 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#541