mirror of
https://github.com/nushell/nushell
synced 2024-11-10 15:14:14 +00:00
Fix clippy errors (Mac) (#9440)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # Description Was getting errors when running the clip checks on another PR. Applied the suggested fixes. <img width="1792" alt="image" src="https://github.com/nushell/nushell/assets/432535/bec30bd9-307d-4877-9eb8-1f8f3ed3edd9"> <img width="1527" alt="image" src="https://github.com/nushell/nushell/assets/432535/f540da61-aa81-4a9e-9948-46d8d45afecb">
This commit is contained in:
parent
b907bf355f
commit
33ad2a36bd
2 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ fn rm(
|
||||||
|
|
||||||
for target in targets {
|
for target in targets {
|
||||||
if currentdir_path.to_string_lossy() == target.item
|
if currentdir_path.to_string_lossy() == target.item
|
||||||
|| currentdir_path.starts_with(&format!("{}{}", target.item, std::path::MAIN_SEPARATOR))
|
|| currentdir_path.starts_with(format!("{}{}", target.item, std::path::MAIN_SEPARATOR))
|
||||||
{
|
{
|
||||||
return Err(ShellError::GenericError(
|
return Err(ShellError::GenericError(
|
||||||
"Cannot remove any parent directory".into(),
|
"Cannot remove any parent directory".into(),
|
||||||
|
|
|
@ -2637,7 +2637,7 @@ pub fn parse_overlay_use(working_set: &mut StateWorkingSet, call: Box<Call>) ->
|
||||||
(
|
(
|
||||||
new_name
|
new_name
|
||||||
.map(|spanned| spanned.item)
|
.map(|spanned| spanned.item)
|
||||||
.unwrap_or(String::from_utf8_lossy(&new_module.name).to_string()),
|
.unwrap_or_else(|| String::from_utf8_lossy(&new_module.name).to_string()),
|
||||||
new_module,
|
new_module,
|
||||||
module_id,
|
module_id,
|
||||||
true,
|
true,
|
||||||
|
|
Loading…
Reference in a new issue