mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -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.
|
||||
let path = make_temp(
|
||||
// Converting Option<String> to Option<&str>
|
||||
dir.as_ref().map(|x| &**x),
|
||||
prefix.as_ref().map(|x| &**x),
|
||||
suffix.as_ref().map(|x| &**x),
|
||||
dir.as_deref(),
|
||||
prefix.as_deref(),
|
||||
suffix.as_deref(),
|
||||
true,
|
||||
)?;
|
||||
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.
|
||||
let path = make_temp(
|
||||
// Converting Option<String> to Option<&str>
|
||||
dir.as_ref().map(|x| &**x),
|
||||
prefix.as_ref().map(|x| &**x),
|
||||
suffix.as_ref().map(|x| &**x),
|
||||
dir.as_deref(),
|
||||
prefix.as_deref(),
|
||||
suffix.as_deref(),
|
||||
false,
|
||||
)?;
|
||||
let path_str = into_string(path.into_os_string())?;
|
||||
|
|
|
@ -161,7 +161,7 @@ impl AstParser {
|
|||
self
|
||||
.comments
|
||||
.take_leading_comments(span.lo())
|
||||
.unwrap_or_else(|| vec![])
|
||||
.unwrap_or_else(Vec::new)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue