mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
fix some clippy warning (#5462)
This commit is contained in:
parent
8228ea85fd
commit
871a0c9c0e
2 changed files with 7 additions and 7 deletions
|
@ -833,9 +833,9 @@ fn op_make_temp_dir(
|
||||||
// We can't assume that paths are always valid utf8 strings.
|
// We can't assume that paths are always valid utf8 strings.
|
||||||
let path = make_temp(
|
let path = make_temp(
|
||||||
// Converting Option<String> to Option<&str>
|
// Converting Option<String> to Option<&str>
|
||||||
dir.as_ref().map(|x| &**x),
|
dir.as_deref(),
|
||||||
prefix.as_ref().map(|x| &**x),
|
prefix.as_deref(),
|
||||||
suffix.as_ref().map(|x| &**x),
|
suffix.as_deref(),
|
||||||
true,
|
true,
|
||||||
)?;
|
)?;
|
||||||
let path_str = into_string(path.into_os_string())?;
|
let path_str = into_string(path.into_os_string())?;
|
||||||
|
@ -864,9 +864,9 @@ fn op_make_temp_file(
|
||||||
// We can't assume that paths are always valid utf8 strings.
|
// We can't assume that paths are always valid utf8 strings.
|
||||||
let path = make_temp(
|
let path = make_temp(
|
||||||
// Converting Option<String> to Option<&str>
|
// Converting Option<String> to Option<&str>
|
||||||
dir.as_ref().map(|x| &**x),
|
dir.as_deref(),
|
||||||
prefix.as_ref().map(|x| &**x),
|
prefix.as_deref(),
|
||||||
suffix.as_ref().map(|x| &**x),
|
suffix.as_deref(),
|
||||||
false,
|
false,
|
||||||
)?;
|
)?;
|
||||||
let path_str = into_string(path.into_os_string())?;
|
let path_str = into_string(path.into_os_string())?;
|
||||||
|
|
|
@ -161,7 +161,7 @@ impl AstParser {
|
||||||
self
|
self
|
||||||
.comments
|
.comments
|
||||||
.take_leading_comments(span.lo())
|
.take_leading_comments(span.lo())
|
||||||
.unwrap_or_else(|| vec![])
|
.unwrap_or_else(Vec::new)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue