Skip to content

Commit e0016e5

Browse files
tottotoctron
authored andcommitted
chore: resolve lint error
1 parent bc84a17 commit e0016e5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/config/rt/serve.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl RtcServe {
130130
})
131131
}
132132

133-
fn common_base(&self) -> Result<Cow<str>> {
133+
fn common_base(&self) -> Result<Cow<'_, str>> {
134134
let base = match &self.watch.build.public_url {
135135
BaseUrl::Default => "/",
136136
BaseUrl::Absolute(url) => {
@@ -164,7 +164,7 @@ impl RtcServe {
164164
Ok(base.into())
165165
}
166166

167-
pub(crate) fn ws_base(&self) -> Result<Cow<str>> {
167+
pub(crate) fn ws_base(&self) -> Result<Cow<'_, str>> {
168168
if let Some(ws_path) = &self.ws_base {
169169
ensure!(ws_path.starts_with('/'), "ws-path must start with a '/'");
170170
return Ok(ws_path.into());
@@ -173,7 +173,7 @@ impl RtcServe {
173173
self.common_base()
174174
}
175175

176-
pub(crate) fn serve_base(&self) -> Result<Cow<str>> {
176+
pub(crate) fn serve_base(&self) -> Result<Cow<'_, str>> {
177177
if let Some(serve_base) = &self.serve_base {
178178
ensure!(
179179
serve_base.starts_with('/'),

src/tools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ mod archive {
660660
fn find_tar_entry(
661661
archive: &mut TarArchive<impl Read>,
662662
path: impl AsRef<Path>,
663-
) -> Result<Option<TarEntry<impl Read>>> {
663+
) -> Result<Option<TarEntry<'_, impl Read>>> {
664664
let entries = archive
665665
.entries()
666666
.context("failed getting archive entries")?;

src/watch.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,10 @@ fn build_error_reason(error: anyhow::Error) -> String {
401401
let mut next = error.source();
402402
while let Some(current) = next {
403403
if i == 0 {
404+
#[allow(clippy::unwrap_used)]
404405
writeln!(&mut result, "Caused by:").unwrap();
405406
}
407+
#[allow(clippy::unwrap_used)]
406408
writeln!(&mut result, "\t{i}: {current}").unwrap();
407409

408410
i += 1;

0 commit comments

Comments
 (0)